OpenCores
URL https://opencores.org/ocsvn/usb_fpga_1_11/usb_fpga_1_11/trunk

Subversion Repositories usb_fpga_1_11

[/] [usb_fpga_1_11/] [trunk/] [bmp/] [Makefile] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
# Copyright (C) 1999-2009 Stefan Ziegenbalg
2
#
3
# main targets:
4
#   all             build bmp
5
#   install         install applications
6
#   install2        install applications to ../bin
7
#   uninstall       uninstall applications
8
#   resetconf       reset configuration
9
#   clean           clean everything but exe's
10
#   distclean       clean everything
11
 
12
#########################
13
# configuration section #
14
#########################
15
#OS  operating system (UNIX for unix like OS)
16
#default: detected automatically
17
#e.g. OS=UNIX
18
 
19
#PCEXTRAFLAGS  additional flags
20
#e.g. PCEXTRAFLAGS=-Xs
21
PCEXTRAFLAGS=-gl
22
 
23
#PREFIX  base directory for installing
24
#default: /usr/local for OS=UNIX and c:\usr else
25
#e.g. PREFIX=/usr
26
 
27
#BINDIR  where to install bin's
28
#default: $(PREFIX)/bin
29
#e.g. BINDIR=/usr/bin
30
 
31
################################
32
# DO NOT CHANAGE THE FOLLOWING #
33
################################
34
ifndef OS
35
ifeq ($(WINDIR),)
36
OS=UNIX
37
else
38
OS=WINDOS
39
endif
40
endif
41
 
42
SOURCES=src/bmp.pas src/bmpsys.pas src/textbuf.pas
43
 
44
UNITS=-Fusrc
45
 
46
PCFLAGS:=-Scgm -O3rGp3 -FE. -Xs $(PCEXTRAFLAGS)
47
INSTALLDIR=$(INSTALL) -d
48
INSTALLEXE=$(INSTALL) -m 0755
49
RM=rm -f
50
ECHO=echo
51
 
52
ifeq ($(OS),UNIX)
53
 
54
CONFIGURESCRIPT=./configure
55
PC:=$(shell $(CONFIGURESCRIPT) pc "$(PCFLAGS)")
56
ifndef PC
57
    $(error Fatal: No correct compiler found or wrong flags)
58
endif
59
INSTALL=$(shell $(CONFIGURESCRIPT) install2)
60
 
61
ifndef PREFIX
62
  PREFIX=/usr/local
63
endif
64
 
65
TARGETS=bmp
66
DEFS=-DUNIX
67
 
68
else
69
 
70
PC=ppc386
71
INSTALL=install
72
 
73
ifndef PREFIX
74
  PREFIX=c:\usr
75
endif
76
 
77
TARGETS=bmp.exe
78
DEFS=-DWINDOWS
79
 
80
endif
81
 
82
ifndef BINDIR
83
  BINDIR=$(PREFIX)/bin
84
endif
85
 
86
.PHONY: all install uninstall resetconf clean distclean
87
 
88
all: bmp.made
89
 
90
bmp.made: $(TARGETS)
91
        $(ECHO) > bmp.made
92
 
93
bmp bmp.exe: $(SOURCES)
94
        $(PC) $(PCFLAGS) $(UNITS) src/bmp.pas
95
 
96
install: $(TARGETS)
97
        $(INSTALLDIR) $(BINDIR)
98
        $(INSTALLEXE) $(TARGETS) $(BINDIR)
99
 
100
install2: $(TARGETS)
101
        $(INSTALLEXE) $(TARGETS) ../bin
102
 
103
uninstall:
104
        - $(RM) $(addprefix $(BINDIR)/,$(TARGETS))
105
 
106
resetconf:
107
        - $(RM) Makefile.conf
108
        - $(RM) conf_*
109
 
110
clean:
111
        - $(RM) *.bak *.o *.ppu *.s */*.bak *.log *.a *~ */*~ *.out
112
        - $(RM) ppas.sh link.res
113
 
114
 
115
distclean: clean resetconf
116
        - $(RM) bmp bmp.exe bmp.made bmp.pas

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.