File: Makefile

package info (click to toggle)
optgeo 2.11-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 12,264 kB
  • sloc: pascal: 56,972; makefile: 100; xml: 63
file content (110 lines) | stat: -rw-r--r-- 2,846 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
DESTDIR =

FPC_VERSION = $(shell update-alternatives --list lazarus | awk -F / '{print $$5}')
ARCH = $(shell ls /usr/lib/lazarus/$(FPC_VERSION)/lcl/units/*/forms.ppu | awk -F/ '{print $$8}')


UNITLIBS  = -Fu/usr/lib/lazarus/$(FPC_VERSION)/lcl/units/$(ARCH)/
UNITLIBS += -Fu/usr/lib/lazarus/$(FPC_VERSION)/lcl/units/$(ARCH)/gtk2/
UNITLIBS += -Fu/usr/lib/lazarus/$(FPC_VERSION)/packager/units/$(ARCH)/
UNITLIBS += -Fu/usr/lib/lazarus/$(FPC_VERSION)/components/printers/lib/$(ARCH)/gtk2/
UNITLIBS += -Fu/usr/lib/lazarus/$(FPC_VERSION)/components/synedit/units/$(ARCH)/
UNITLIBS += -Fu.
TARGET    = -TLINUX
MODE      = -MObjFPC
SWITCHES  = -Scgi #C-style operators, label and goto, C++ style INLINE.
OPTIM     = -O1
DEBUG     = -gl
VERBOSE   = -vewnhi
LOGO      = -l
INCPATH   = -Fi/
DEFINES   = -dLCL -dLCLgtk2

LRSFILES_TO_BUILD = \
fiche_affiche_coordonees.lrs \
modif_espace_travail.lrs \
optgeo.compiled \
ray1.lrs \
saisiecercle.lrs \
saisiech.lrs \
saisiedia.lrs \
saisieec.lrs \
saisief1.lrs \
saisiefant.lrs \
saisiefle.lrs \
saisiegr.lrs \
saisielamesr.lrs \
saisielec.lrs \
saisielmc.lrs \
saisielmd.lrs \
saisiemconique.lrs \
saisiemp.lrs \
saisiemscepa.lrs \
saisiemscere.lrs \
saisiemscopa.lrs \
saisiemscore.lrs \
saisienor.lrs \
saisieoe.lrs \
saisieop1.lrs \
saisiepri.lrs \
saisieptssurfaceonde.lrs \
saisieray.lrs \
saisiesp1.lrs \
saisiesphere.lrs \
unit10.lrs \
Unit11.lrs \
unit12.lrs \
Unit13.lrs \
unit14.lrs \
Unit15.lrs \
Unit16.lrs \
unit17b.lrs \
Unit17.lrs \
Unit18.lrs \
Unit19.lrs \
unit1_palette.lrs \
UNIT32.lrs \
Unit3.lrs \
Unit4.lrs \
Unit5.lrs \
Unit6.lrs \
Unit8.lrs \
unit9.lrs \
unitconfigpostscript.lrs \
Unitgpl.lrs \
unit_imp.lrs \
unit_indices_milieu_ambiant.lrs \
unit_quelobjet.lrs

LRS_SOURCES = $(shell for f in $(LRSFILES_TO_BUILD); do g=$$(echo $$f| sed 's/\..*/.lfm/'); if [ -f $$g ]; then echo $$g; else echo $$f| sed 's/\..*/.pas/'; fi; done;)

all: optgeo

optgeo: optgeo.lpr
	for f in $(LRS_SOURCES); do \
	  lazres $$(echo $$f| sed 's/\..*/.lrs/') $$f; \
	done
	fpc -B  $(MODE) $(SWITCHES) $(OPTIM) $(DEBUG) $(VERBOSE) $(LOGO) $(INCPATH) $(UNITLIBS) $(DEFINES) $(TARGET) -o$@ $<



clean:
	rm -f *~ *.o *.ppu *.res *.manifest *.rc *.rst *.or *.lpi
	rm -f optgeo
	rm -f $(LRSFILES_TO_BUILD)

install: all
	install -d $(DESTDIR)/usr/bin
	install -m 755 optgeo $(DESTDIR)/usr/bin
	install -d $(DESTDIR)/usr/share/optgeo
	cp -a exemples $(DESTDIR)/usr/share/optgeo
	cp -a lang $(DESTDIR)/usr/share/optgeo
	cp -a aide $(DESTDIR)/usr/share/optgeo
	cp listen.lst $(DESTDIR)/usr/share/optgeo
	find $(DESTDIR)/usr/share/optgeo -type f -exec chmod 644 {} \;
	install -d $(DESTDIR)/usr/share/pixmaps
	rsvg -w 48 optgeo.svg $(DESTDIR)/usr/share/pixmaps/optgeo-48.png
	install -d $(DESTDIR)/usr/share/applications
	install -m 644 optgeo.desktop $(DESTDIR)/usr/share/applications

.PHONY: all clean install