1: VERSION=0.98l
2: COPYRIGHT=Copyright (C) 2002-2009 INED-EUROREVES-Institut de longévité
3: IMACHSETUPVERSION=1
4:
5: # make _linux=1 imachopt
6: # make _linux=1 imach
7:
8: # make _macosx=1 imach
9: # make _macosx=1 imachdmg
10:
11: # Windows
12: # make _windows=1 imachcyg
13: # make _windows=1 imachcyg-setup (touch setup.iss.in)
14: # make _windows=1 imachcyg-noreg-setup
15: # sortie dans Output/setup.exe
16: # ln -s /cygdrive/c/Program\ Files/Inno\ Setup\ 4/Compil32.exe /usr/local/bin/Compil32
17: ##SETUPCOMP= "C:\Program Files\Inno Setup 3\Compil32.exe"
18:
19: #CC= gcc -v
20: CC=$(GCC)
21: GCC= gcc
22:
23: ifdef _macosx
24: # Mac OS/X version
25: LFLAGS= -O3 -lm -DUNIX
26: CFLAGS= -O3 -DUNIX
27: UNIX2DOS= echo "Unix2dos "
28: # Don'know how to launch imach098.pmsp in batch to create package file imach098Panther.pkg
29: # ./createdmg.sh imach imach098panther ./imach098Panther
30: # ./createdmg.sh imach imach098leopard ./imach098Leopard
31: # and directory ./imach098Panther contains package file imach098Panther.pkg
32: #./create-dmg --window-size 500 300 --background ~/Projects/eclipse-osx-repackager/build/background.gif --icon-size 96 --volname "Hyper Foo" --icon "Applications" 380 205 --icon "Eclipse OS X Repackager" 110 205 test2.dmg /Users/andreyvit/Projects/eclipse-osx-repackager/temp/Eclipse\ OS\ X\ Repackager\ r10/
33: # ./create-dmg --volname "IMaCh 0.98j" imach098j.dmg imach098Leopard
34: endif
35:
36: ifdef _windows
37: CC=c:\MinGW\bin\Mingw32-gcc
38:
39: # Windows cygwin version
40: LFLAGS= -g -mno-cygwin
41: CFLAGS= -g -mno-cygwin
42: LFLAGSOPT= -O3 -mno-cygwin
43: CFLAGSOPT= -O3 -mno-cygwin
44: UNIX2DOS= unix2dos
45: #SETUPCOMP= Compil32
46: ##SETUPCOMP=start /wait "C:\Program\ Files\\Compil32.exe"
47: # cygwin SETUPCOMP= "C:\Program Files\Inno Setup 4\Compil32.exe"
48: SETUPCOMP= "C:////Program Files////Inno Setup 4////Compil32.exe"
49: endif
50:
51: ifdef _windowsonlinux
52: GCC=/usr/bin/i586-pc-mingw32-gcc
53: LFLAGS= -g
54: CFLAGS= -g
55: LFLAGSOPT= -O3
56: CFLAGSOPT= -O3
57: UNIX2DOS= unix2dos
58: SETUPCOMP= wine "C:////Program Files////Inno Setup 4////Compil32.exe"
59: endif
60:
61: ifdef _linux
62: #CFLAGS= -g -DUNIX -DDEBUGHESS
63: CFLAGS= -g -DUNIX
64: LFLAGS= -g -lm
65: LGSL= -lgsl -lgslcblas
66: CFLAGSOPT= -O3 -DUNIX
67: LFLAGSOPT= -O3 -lm
68: UNIX2DOS= unix2dos
69: SETUPCOMP= wine "C:////Program Files////Inno Setup 4////Compil32.exe"
70: endif
71:
72: SED= sed
73: PACKAGE=imach
74: PROGRAM=IMaCh
75:
76:
77:
78: TMPSETUPSCRIPT=setup.iss
79: TMPNOREGSETUPSCRIPT=noreg-setup.iss
80: TMPSCRIPTIN=setup.iss.in
81: APPLICATION=IMaCh
82: APPNAME=$(APPLICATION)-$(VERSION)
83: GNUPLOTVERSION=4.0
84: LICENSE=Copying
85: TMPSETUPEXE=imach-$(VERSION)-$(IMACHSETUPVERSION)-setup.exe
86: LICENSEFILE=$(LICENSE)
87: INFOBEFOREFILE=README.txt
88:
89: $(TMPSETUPSCRIPT): $(TMPSCRIPTIN)
90: $(SED) -e "s/@APPNAME@/$(APPNAME)/g; \
91: s/@NOTINNOREG@//g; \
92: s/@NOREG@//g; \
93: s/@IMACHSETUPVERSION@/$(IMACHSETUPVERSION)/g; \
94: s/@VERSION@/$(VERSION)/g; \
95: s/@GNUPLOTVERSION@/$(GNUPLOTVERSION)/g; \
96: s/@INFOBEFOREFILE@/$(INFOBEFOREFILE)/g; \
97: s/@LICENSEFILE@/$(LICENSEFILE)/g; \
98: s/@PACKAGE@/$(PACKAGE)/g; \
99: s/@DICTLANG@/$(DICTLANG)/g; \
100: s/@VERMAJOR@/$(VERMAJOR)/g; \
101: s/@COPYRIGHT@/$(COPYRIGHT)/g;" \
102: $(TMPSCRIPTIN) > $(TMPSETUPSCRIPT)
103:
104: $(TMPNOREGSETUPSCRIPT): $(TMPSCRIPTIN)
105: $(SED) -e "s/@APPNAME@/$(APPNAME)/g; \
106: s/@NOTINNOREG@/\\;/g; \
107: s/@NOREG@/noreg-/g; \
108: s/@IMACHSETUPVERSION@/$(IMACHSETUPVERSION)/g; \
109: s/@VERSION@/$(VERSION)/g; \
110: s/@GNUPLOTVERSION@/$(GNUPLOTVERSION)/g; \
111: s/@INFOBEFOREFILE@/$(INFOBEFOREFILE)/g; \
112: s/@LICENSEFILE@/$(LICENSEFILE)/g; \
113: s/@PACKAGE@/$(PACKAGE)/g; \
114: s/@DICTLANG@/$(DICTLANG)/g; \
115: s/@VERMAJOR@/$(VERMAJOR)/g; \
116: s/@COPYRIGHT@/$(COPYRIGHT)/g;" \
117: $(TMPSCRIPTIN) > $(TMPNOREGSETUPSCRIPT)
118: # $(UNIX2DOS) $(TMPNOREGSETUPSCRIPT)
119:
120: $(TMPSETUPEXE): $(TMPSETUPSCRIPT)
121: $(SETUPCOMP) /cc $(TMPSETUPSCRIPT)
122:
123: $(TMPNOREGSETUPEXE): $(TMPNOREGSETUPSCRIPT)
124: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
125:
126: PARAM=mypar1
127:
128: imachcyg-setup: imachcygopt.exe setup.iss
129: copy imachcygopt.exe imach.exe
130: $(SETUPCOMP) /cc $(TMPSETUPSCRIPT)
131:
132: # imachcyg-noreg-setup : imachcygopt imachcygopt.o setup.iss.in noreg-setup.iss $(TMPNOREGSETUPEXE)
133: imachcyg-noreg-setup: imachcygopt.exe noreg-setup.iss
134: cp imachcygopt.exe imach.exe
135: $(SETUPCOMP) /cc $(TMPNOREGSETUPSCRIPT)
136:
137: simach : simach.o
138: $(CC) $(LFLAGS) $(LGSL) -o simach simach.o
139: simach.o : simach.c
140: $(CC) $(CFLAGS) -c simach.c
141:
142: imach : imach.o
143: $(CC) $(LFLAGS) -o imach imach.o
144: imach.o : imach.c
145: $(CC) $(CFLAGS) -c imach.c
146:
147: imachopt : imachopt.o
148: $(CC) $(LFLAGSOPT) -o imachopt imachopt.o
149: ln -f imachopt imach
150: imachopt.o : imach.c
151: $(CC) $(CFLAGSOPT) -o imachopt.o -c imach.c
152:
153: imachdmg : imachopt.o create-dmg
154: $(CC) $(LFLAGSOPT) -o imach imachopt.o
155: cp imach imach098Leopard/bin
156: ./create-dmg --volname "IMaCh $(VERSION)" imach$(VERSION).dmg imach098Leopard
157:
158:
159: imachcyg : imachcyg.o strsep.o
160: $(CC) $(LFLAGS) -o imach imachcyg.o strsep.o
161: imachcyg.o : imach.c
162: $(CC) $(CFLAGS) -c -o imachcyg.o imach.c
163: imachcygopt.exe : imachcygopt.o strsep.o
164: $(CC) $(LFLAGSOPT) -o imachcygopt.exe imachcygopt.o strsep.o
165: imachcygopt.o : imach.c
166: $(CC) $(CFLAGSOPT) -c -o imachcygopt.o imach.c
167: strsep.o : strsep.c
168: $(CC) $(CFLAGSOPT) -c -o strsep.o strsep.c
169:
170: imachw32.o : imach.c
171: i386-mingw32-gcc -c imach.c -o imachw32.o
172: imach.exe : imachw32.o
173: i386-mingw32-gcc -mwindows -o imach.exe -lm imachw32.o
174: i386-mingw32-strip imach.exe
175:
176:
177: $(PARAM).htm: imach $(PARAM).imach data1.txt
178: ./imach $(PARAM).imach
179:
180: clean:
181: rm or$(PARAM).txt er$(PARAM).txt pijr$(PARAM).txt plr$(PARAM).txt \
182: r$(PARAM).txt tr$(PARAM).txt vpl$(PARAM).txt pr$(PARAM).txt \
183: vr$(PARAM).txt *.gif imach.exe imach.o
184:
185:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>