master Makefile: added copyonlyinstall target which does not depend on prepinstall.
[sdk] / Makefile
1 .PHONY: all clean realclean distclean emptyoutput prepinstall actualinstall install copyonlyinstall uninstall troubleshoot outputdirs bootstrap deps ecere ecerecom ecerevanilla ear compiler prepbinaries epj2make ide documentor eda prepcodeguard codeguard
2 .SILENT:
3
4 include include.mk
5
6 LIBVER := .0.44
7
8 ifdef WINDOWS
9
10 SOV := $(SO)
11
12 ifndef DESTDIR
13
14 ifdef ProgramFiles(x86)
15 export DESTDIR=${ProgramFiles(x86)}/Ecere SDK
16 else
17 ifdef ProgramFiles
18 export DESTDIR=$(ProgramFiles)/Ecere SDK
19 else
20 export DESTDIR=$(SystemDrive)/Ecere SDK
21 endif
22 endif
23
24 endif # DESTDIR
25
26 export prefix=
27
28 ifndef DOCDIR
29 export DOCDIR=$(DESTDIR)$(prefix)/doc
30 endif
31
32 ifndef BINDIR
33 export BINDIR=$(DESTDIR)$(prefix)/bin
34 endif
35
36 ifndef LIBDIR
37 export LIBDIR=$(BINDIR)
38 endif
39
40 ifndef SLIBDIR
41 export SLIBDIR=$(DESTDIR)$(prefix)/lib
42 endif
43
44 ifndef SAMPLESDIR
45 export SAMPLESDIR=$(DESTDIR)$(prefix)/samples
46 endif
47
48 ifndef EXTRASDIR
49 export EXTRASDIR=$(DESTDIR)$(prefix)/extras
50 endif
51
52
53 else # WINDOWS
54
55 SOV := $(SO)$(LIBVER)
56
57 ifndef DESTDIR
58 export DESTDIR=
59 endif
60
61 ifndef prefix
62 export prefix=/usr
63 endif
64
65 ifndef DOCDIR
66 export DOCDIR=$(DESTDIR)$(prefix)/share/ecere/doc
67 endif
68
69 ifndef BINDIR
70 export BINDIR=$(DESTDIR)$(prefix)/bin
71 endif
72
73 HOSTTYPE := $(shell uname -m)
74
75 ifndef LIBDIR
76 ifeq "$(HOSTTYPE)" "x86_64"
77 export LIBDIR=$(DESTDIR)$(prefix)/lib32
78 else
79 export LIBDIR=$(DESTDIR)$(prefix)/lib
80 endif
81 endif
82
83 ifndef SLIBDIR
84 ifeq "$(HOSTTYPE)" "x86_64"
85 export SLIBDIR=$(DESTDIR)$(prefix)/lib32
86 else
87 export SLIBDIR=$(DESTDIR)$(prefix)/lib
88 endif
89 endif
90
91 ifndef SAMPLESDIR
92 export SAMPLESDIR=$(DESTDIR)$(prefix)/share/ecere/samples
93 endif
94
95 ifndef EXTRASDIR
96 export EXTRASDIR=$(DESTDIR)$(prefix)/share/ecere/extras
97 endif
98
99
100 endif
101
102 all: prepbinaries ide epj2make documentor eda codeguard
103         @$(call echo,The Ecere SDK is fully built.)
104
105 outputdirs:
106         $(if $(wildcard obj/),,$(call mkdirq,obj/))
107         $(if $(wildcard obj/$(PLATFORM)/bin/),,$(call mkdirq,obj/$(PLATFORM)/bin/))
108         $(if $(wildcard obj/$(PLATFORM)/lib/),,$(call mkdirq,obj/$(PLATFORM)/lib/))
109
110 bootstrap: outputdirs
111         cd compiler && $(MAKE) bootstrap
112
113 deps:
114         @$(call echo,Building dependencies...)
115         cd deps && $(MAKE)
116
117 ecere: bootstrap deps
118         @$(call echo,Building 2nd stage ecere...)
119         cd ecere && $(MAKE) nores
120         cd ear && $(MAKE) nores
121         cd ecere && $(MAKE) cleantarget
122         cd ecere && $(MAKE)
123
124 ecerecom: bootstrap
125         @$(call echo,Building eC Core Runtime...)
126         cd ecere && $(MAKE) -f Makefile.ecereCOM
127
128 ecerevanilla: bootstrap
129         @$(call echo,Building Vanilla Ecere...)
130         cd ecere && $(MAKE) -f Makefile.vanilla
131
132 ear: ecere ecerevanilla
133         @$(call echo,Building ear...)
134         cd ear && cd cmd && $(MAKE) cleantarget
135         cd ear && $(MAKE)
136
137 compiler: ecere ear
138         @$(call echo,Building 2nd stage compiler)
139         cd compiler && $(MAKE)
140
141 prepbinaries: compiler ecerecom
142         @$(call echo,Enabling 2nd stage binaries...)
143 ifdef WINDOWS
144         $(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SOV),obj/$(PLATFORM)/bin/)
145         $(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SOV),obj/$(PLATFORM)/bin/)
146         $(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SOV),obj/$(PLATFORM)/bin/)
147 endif
148 ifdef LINUX
149         $(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SOV),obj/$(PLATFORM)/lib/)
150         $(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SOV),obj/$(PLATFORM)/lib/)
151         $(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SOV),obj/$(PLATFORM)/lib/)
152         ln -sf $(LP)ecere$(SOV) obj/$(PLATFORM)/lib/$(LP)ecere$(SO).0
153         ln -sf $(LP)ecereCOM$(SOV) obj/$(PLATFORM)/lib/$(LP)ecereCOM$(SO).0
154         ln -sf $(LP)ec$(SOV) obj/$(PLATFORM)/lib/$(LP)ec$(SO).0
155         ln -sf $(LP)ecere$(SOV) obj/$(PLATFORM)/lib/$(LP)ecere$(SO)
156         ln -sf $(LP)ecereCOM$(SOV) obj/$(PLATFORM)/lib/$(LP)ecereCOM$(SO)
157         ln -sf $(LP)ec$(SOV) obj/$(PLATFORM)/lib/$(LP)ec$(SO)
158 endif
159 ifndef WINDOWS
160 ifndef LINUX
161         $(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SO),obj/$(PLATFORM)/lib/)
162         $(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SO),obj/$(PLATFORM)/lib/)
163         $(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SO),obj/$(PLATFORM)/lib/)
164 endif
165 endif
166         $(call cpq,ear/cmd/obj/release.$(PLATFORM)/ear$(E),obj/$(PLATFORM)/bin/)
167         $(call cpq,compiler/ecc/obj/release.$(PLATFORM)/ecc$(E),obj/$(PLATFORM)/bin/)
168         $(call cpq,compiler/ecp/obj/release.$(PLATFORM)/ecp$(E),obj/$(PLATFORM)/bin/)
169         $(call cpq,compiler/ecs/obj/release.$(PLATFORM)/ecs$(E),obj/$(PLATFORM)/bin/)
170
171 epj2make: prepbinaries
172         @$(call echo,Building epj2make...)
173         cd epj2make && $(MAKE)
174
175 ide: prepbinaries
176         @$(call echo,Building IDE...)
177         cd ide && $(MAKE)
178
179 documentor: prepbinaries
180         @$(call echo,Building Documentor...)
181         cd documentor && $(MAKE)
182
183 codeguard: prepcodeguard
184 ifdef CodeGuard
185         @$(call echo,Building CodeGuard client...)
186         cd codeGuard && $(MAKE)
187 endif
188
189 prepcodeguard: eda
190 ifdef CodeGuard
191 ifdef WINDOWS
192         $(call cpq,eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SO),obj/$(PLATFORM)/bin/)
193 endif
194
195 ifdef LINUX
196         $(call cpq,eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SOV),obj/$(PLATFORM)/lib/)
197         ln -sf $(LP)EDA$(SOV) obj/$(PLATFORM)/lib/$(LP)EDA$(SO).0
198         ln -sf $(LP)EDA$(SOV) obj/$(PLATFORM)/lib/$(LP)EDA$(SO)
199 endif
200
201 ifndef WINDOWS
202 ifndef LINUX
203         $(call cpq,eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SO),obj/$(PLATFORM)/lib/)
204 endif
205 endif
206 endif
207
208 eda: prepbinaries
209         @$(call echo,Building EDA...)
210         cd eda && $(MAKE)
211
212 emptyoutput: outputdirs
213         $(call rmq,obj/$(PLATFORM)/lib/libecereVanilla$(A))
214         $(call rmq,$(SODESTDIR)$(LP)ecere$(SO))
215         $(call rmq,$(SODESTDIR)$(LP)ecereCOM$(SO))
216         $(call rmq,$(SODESTDIR)$(LP)ec$(SO))
217         $(call rmq,$(SODESTDIR)$(LP)EDA$(SO))
218         $(call rmq,$(SODESTDIR)$(LP)EDASQLite$(SO))
219 ifdef EDASQLiteCipher
220         $(call rmq,$(SODESTDIR)$(LP)EDASQLiteCipher$(SO))
221 endif
222 ifdef LINUX
223         $(call rmq,$(SODESTDIR)$(LP)ecere$(SO).0)
224         $(call rmq,$(SODESTDIR)$(LP)ecereCOM$(SO).0)
225         $(call rmq,$(SODESTDIR)$(LP)ec$(SO).0)
226         $(call rmq,$(SODESTDIR)$(LP)EDA$(SO).0)
227         $(call rmq,$(SODESTDIR)$(LP)EDASQLite$(SO).0)
228 ifdef EDASQLiteCipher
229         $(call rmq,$(SODESTDIR)$(LP)EDASQLiteCipher$(SO).0)
230 endif
231         $(call rmq,$(SODESTDIR)$(LP)ecere$(SOV))
232         $(call rmq,$(SODESTDIR)$(LP)ecereCOM$(SOV))
233         $(call rmq,$(SODESTDIR)$(LP)ec$(SOV))
234         $(call rmq,$(SODESTDIR)$(LP)EDA$(SOV))
235         $(call rmq,$(SODESTDIR)$(LP)EDASQLite$(SOV))
236 ifdef EDASQLiteCipher
237         $(call rmq,$(SODESTDIR)$(LP)EDASQLiteCipher$(SOV))
238 endif
239 endif   
240         $(call rmq,obj/$(PLATFORM)/bin/ear$(E))
241         $(call rmq,obj/$(PLATFORM)/bin/ecc$(E))
242         $(call rmq,obj/$(PLATFORM)/bin/ecp$(E))
243         $(call rmq,obj/$(PLATFORM)/bin/ecs$(E))
244         $(call rmq,obj/$(PLATFORM)/bin/epj2make$(E))
245         $(call rmq,obj/$(PLATFORM)/bin/ide$(E))
246         $(call rmq,obj/$(PLATFORM)/bin/documentor$(E))
247 ifdef EDASQLiteCipher
248         $(call rmq,obj/$(PLATFORM)/bin/CodeGuard$(E))
249 endif
250
251 clean: emptyoutput
252         cd deps && $(MAKE) clean
253         cd ecere && $(MAKE) clean
254         cd compiler && $(MAKE) clean
255         cd ear && $(MAKE) clean
256         cd epj2make && $(MAKE) clean
257         cd ide && $(MAKE) clean
258         cd documentor && $(MAKE) clean
259 ifdef CodeGuard
260         cd codeGuard && $(MAKE) clean
261 endif
262         cd eda && $(MAKE) clean
263         @$(call echo,Done.)
264
265 realclean:
266         cd deps && $(MAKE) realclean
267         cd ecere && $(MAKE) realclean
268         cd compiler && $(MAKE) realclean
269         cd ear && $(MAKE) realclean
270         cd epj2make && $(MAKE) realclean
271         cd ide && $(MAKE) realclean
272         cd documentor && $(MAKE) realclean
273 ifdef CodeGuard
274         cd codeGuard && $(MAKE) realclean
275 endif
276         cd eda && $(MAKE) realclean
277         $(call rmrq,obj/$(PLATFORM)/)
278         @$(call echo,Done.)
279
280 distclean:
281         cd deps && $(MAKE) distclean
282         cd ecere && $(MAKE) distclean
283         cd compiler && $(MAKE) distclean
284         cd ear && $(MAKE) distclean
285         cd epj2make && $(MAKE) distclean
286         cd ide && $(MAKE) distclean
287         cd documentor && $(MAKE) distclean
288 ifdef CodeGuard
289         cd codeGuard && $(MAKE) distclean
290 endif
291         cd eda && $(MAKE) distclean
292         $(call rmrq,obj/)
293         @$(call echo,Done.)
294
295 DOC = doc/tao.pdf doc/ecere.eCdoc doc/ecereCOM.eCdoc doc/EDA.eCdoc
296
297 BINARIES = \
298         ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SOV) \
299         ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SOV) \
300         ecere/obj/vanilla.$(PLATFORM)/libecereVanilla$(A) \
301         compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SOV) \
302         compiler/ecp/obj/release.$(PLATFORM)/ecp$(E) \
303         compiler/ecc/obj/release.$(PLATFORM)/ecc$(E) \
304         compiler/ecs/obj/release.$(PLATFORM)/ecs$(E) \
305         ear/cmd/obj/release.$(PLATFORM)/ear$(E) \
306         epj2make/obj/release.$(PLATFORM)/epj2make$(E) \
307         documentor/obj/release.$(PLATFORM)/documentor$(E) \
308         ide/obj/release.$(PLATFORM)/ide$(E) \
309         eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SOV) \
310         eda/drivers/sqlite/obj/release.$(PLATFORM)/$(LP)EDASQLite$(SOV)
311
312 ifdef CodeGuard
313 BINARIES += codeGuard/obj/release.$(PLATFORM)/CodeGuard$(E)
314 endif
315
316 ifdef EDASQLiteCipher
317 BINARIES += eda/drivers/sqliteCipher/obj/release.$(PLATFORM)/$(LP)EDASQLiteCipher$(SOV)
318 endif
319
320 # Making sure everything is in obj/$(PLATFORM)/bin/ and obj/$(PLATFORM)/lib/
321 # Shared Libraries (in obj/$(PLATFORM)/bin/ on Windows and obj/$(PLATFORM)/lib/ otherwise)
322 # Symlinks for libs on Linux
323 # Binaries (always in obj/$(PLATFORM)/bin/) and Static Libraries (always in obj/$(PLATFORM)/lib/)
324 prepinstall: $(DOC) $(BINARIES) outputdirs
325
326 ifdef WINDOWS
327         $(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SO),obj/$(PLATFORM)/bin/)
328         $(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SO),obj/$(PLATFORM)/bin/)
329         $(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SO),obj/$(PLATFORM)/bin/)
330         $(call cpq,eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SO),obj/$(PLATFORM)/bin/)
331         $(call cpq,eda/drivers/sqlite/obj/release.$(PLATFORM)/$(LP)EDASQLite$(SO),obj/$(PLATFORM)/bin/)
332 ifdef EDASQLiteCipher
333         $(call cpq,eda/drivers/sqliteCipher/obj/release.$(PLATFORM)/$(LP)EDASQLiteCipher$(SO),obj/$(PLATFORM)/bin/)
334 endif
335 endif
336
337 ifdef LINUX
338         $(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SOV),obj/$(PLATFORM)/lib/)
339         $(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SOV),obj/$(PLATFORM)/lib/)
340         $(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SOV),obj/$(PLATFORM)/lib/)
341         $(call cpq,eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SOV),obj/$(PLATFORM)/lib/)
342         $(call cpq,eda/drivers/sqlite/obj/release.$(PLATFORM)/$(LP)EDASQLite$(SOV),obj/$(PLATFORM)/lib/)
343 ifdef EDASQLiteCipher
344         $(call cpq,eda/drivers/sqliteCipher/obj/release.$(PLATFORM)/$(LP)EDASQLiteCipher$(SOV),obj/$(PLATFORM)/lib/)
345 endif
346         ln -sf $(LP)ecere$(SOV) obj/$(PLATFORM)/lib/$(LP)ecere$(SO).0
347         ln -sf $(LP)ecereCOM$(SOV) obj/$(PLATFORM)/lib/$(LP)ecereCOM$(SO).0
348         ln -sf $(LP)ec$(SOV) obj/$(PLATFORM)/lib/$(LP)ec$(SO).0
349         ln -sf $(LP)EDA$(SOV) obj/$(PLATFORM)/lib/$(LP)EDA$(SO).0
350         ln -sf $(LP)EDASQLite$(SOV) obj/$(PLATFORM)/lib/$(LP)EDASQLite$(SO).0
351 ifdef EDASQLiteCipher
352         ln -sf $(LP)EDASQLiteCipher$(SOV) obj/$(PLATFORM)/lib/$(LP)EDASQLiteCipher$(SO).0
353 endif
354         ln -sf $(LP)ecere$(SOV) obj/$(PLATFORM)/lib/$(LP)ecere$(SO)
355         ln -sf $(LP)ecereCOM$(SOV) obj/$(PLATFORM)/lib/$(LP)ecereCOM$(SO)
356         ln -sf $(LP)ec$(SOV) obj/$(PLATFORM)/lib/$(LP)ec$(SO)
357         ln -sf $(LP)EDA$(SOV) obj/$(PLATFORM)/lib/$(LP)EDA$(SO)
358         ln -sf $(LP)EDASQLite$(SOV) obj/$(PLATFORM)/lib/$(LP)EDASQLite$(SO)
359 ifdef EDASQLiteCipher
360         ln -sf $(LP)EDASQLiteCipher$(SOV) obj/$(PLATFORM)/lib/$(LP)EDASQLiteCipher$(SO)
361 endif
362 endif
363
364 ifndef WINDOWS
365 ifndef LINUX
366         $(call cpq,ecere/obj/release.$(PLATFORM)/$(LP)ecere$(SO),obj/$(PLATFORM)/lib/)
367         $(call cpq,ecere/obj/ecereCOM.release.$(PLATFORM)/$(LP)ecereCOM$(SO),obj/$(PLATFORM)/lib/)
368         $(call cpq,compiler/libec/obj/release.$(PLATFORM)/$(LP)ec$(SO),obj/$(PLATFORM)/lib/)
369         $(call cpq,eda/libeda/obj/release.$(PLATFORM)/$(LP)EDA$(SO),obj/$(PLATFORM)/lib/)
370         $(call cpq,eda/drivers/sqlite/obj/release.$(PLATFORM)/$(LP)EDASQLite$(SO),obj/$(PLATFORM)/lib/)
371 ifdef EDASQLiteCipher
372         $(call cpq,eda/drivers/sqliteCipher/obj/release.$(PLATFORM)/$(LP)EDASQLiteCipher$(SO),obj/$(PLATFORM)/lib/)
373 endif
374 endif
375 endif
376
377         $(call cpq,ide/obj/release.$(PLATFORM)/ide$(E),obj/$(PLATFORM)/bin/)
378         $(call cpq,ear/cmd/obj/release.$(PLATFORM)/ear$(E),obj/$(PLATFORM)/bin/)
379         $(call cpq,compiler/ecc/obj/release.$(PLATFORM)/ecc$(E),obj/$(PLATFORM)/bin/)
380         $(call cpq,compiler/ecp/obj/release.$(PLATFORM)/ecp$(E),obj/$(PLATFORM)/bin/)
381         $(call cpq,compiler/ecs/obj/release.$(PLATFORM)/ecs$(E),obj/$(PLATFORM)/bin/)
382         $(call cpq,epj2make/obj/release.$(PLATFORM)/epj2make$(E),obj/$(PLATFORM)/bin/)
383         $(call cpq,documentor/obj/release.$(PLATFORM)/documentor$(E),obj/$(PLATFORM)/bin/)
384 ifdef CodeGuard
385         $(call cpq,codeGuard/obj/release.$(PLATFORM)/CodeGuard$(E),obj/$(PLATFORM)/bin/)
386 endif
387         $(call cpq,ecere/obj/vanilla.$(PLATFORM)/libecereVanilla$(A),obj/$(PLATFORM)/lib/)
388
389 #TODO: Samples?
390 install: prepinstall actualinstall
391         @$(call echo,The Ecere SDK has been installed.)
392
393 copyonlyinstall: actualinstall
394         @$(call echo,The Ecere SDK has been installed. copyonlyinstall.)
395
396 actualinstall:
397 ifdef WINDOWS
398         $(call mkdirq,"$(BINDIR)/")
399         $(call mkdirq,"$(SLIBDIR)/")
400         $(call mkdirq,"$(DOCDIR)/")
401         $(call cpq,obj/$(PLATFORM)/bin/$(LP)ecere$(SO),"$(LIBDIR)/")
402         $(call cpq,obj/$(PLATFORM)/bin/$(LP)ecereCOM$(SO),"$(LIBDIR)/")
403         $(call cpq,obj/$(PLATFORM)/bin/$(LP)ec$(SO),"$(LIBDIR)/")
404         $(call cpq,obj/$(PLATFORM)/bin/$(LP)EDA$(SO),"$(LIBDIR)/")
405         $(call cpq,obj/$(PLATFORM)/bin/$(LP)EDASQLite$(SO),"$(LIBDIR)/")
406 ifdef EDASQLiteCipher
407         $(call cpq,obj/$(PLATFORM)/bin/$(LP)EDASQLiteCipher$(SO),"$(LIBDIR)/")
408 endif
409         $(call cpq,obj/$(PLATFORM)/bin/ide$(E),"$(BINDIR)/")
410         $(call cpq,obj/$(PLATFORM)/bin/ear$(E),"$(BINDIR)/")
411         $(call cpq,obj/$(PLATFORM)/bin/ecc$(E),"$(BINDIR)/")
412         $(call cpq,obj/$(PLATFORM)/bin/ecp$(E),"$(BINDIR)/")
413         $(call cpq,obj/$(PLATFORM)/bin/ecs$(E),"$(BINDIR)/")
414         $(call cpq,obj/$(PLATFORM)/bin/epj2make$(E),"$(BINDIR)/")
415         $(call cpq,obj/$(PLATFORM)/bin/documentor$(E),"$(BINDIR)/")
416 ifdef CodeGuard
417         $(call cpq,obj/$(PLATFORM)/bin/CodeGuard$(E),"$(BINDIR)/")
418 endif
419         $(call cpq,obj/$(PLATFORM)/lib/libecereVanilla$(A),"$(SLIBDIR)/")
420         $(call cpq,doc/tao.pdf,"$(DOCDIR)/Ecere Tao of Programming [work in progress].pdf")
421         $(call cpq,doc/ecere.eCdoc,"$(DOCDIR)/")
422         $(call cpq,doc/ecereCOM.eCdoc,"$(DOCDIR)/")
423         $(call cpq,doc/EDA.eCdoc,"$(DOCDIR)/")
424 endif
425
426 ifdef OSX 
427         install obj/$(PLATFORM)/lib/$(LP)ecere$(SO) $(LIBDIR)/
428         install obj/$(PLATFORM)/lib/$(LP)ecereCOM$(SO) $(LIBDIR)/
429         install obj/$(PLATFORM)/lib/$(LP)ec$(SO) $(LIBDIR)/
430         install obj/$(PLATFORM)/lib/$(LP)EDA$(SO) $(LIBDIR)/
431         install obj/$(PLATFORM)/lib/$(LP)EDASQLite$(SO) $(LIBDIR)/
432 ifdef EDASQLiteCipher
433         install obj/$(PLATFORM)/lib/$(LP)EDASQLiteCipher$(SO) $(LIBDIR)/
434 endif
435         install obj/$(PLATFORM)/bin/ide$(E) $(BINDIR)/
436         install obj/$(PLATFORM)/bin/ear$(E) $(BINDIR)/
437         install obj/$(PLATFORM)/bin/ecc$(E) $(BINDIR)/
438         install obj/$(PLATFORM)/bin/ecp$(E) $(BINDIR)/
439         install obj/$(PLATFORM)/bin/ecs$(E) $(BINDIR)/
440         install obj/$(PLATFORM)/bin/epj2make$(E) $(BINDIR)/
441         install obj/$(PLATFORM)/bin/documentor$(E) $(BINDIR)/
442 ifdef CodeGuard
443         install obj/$(PLATFORM)/bin/CodeGuard$(E) $(BINDIR)/
444 endif
445         install obj/$(PLATFORM)/lib/libecereVanilla$(A) $(SLIBDIR)/
446         install -d $(DOCDIR)/
447         install doc/tao.pdf $(DOCDIR)/"Ecere Tao of Programming [work in progress].pdf"
448         install doc/ecere.eCdoc $(DOCDIR)/
449         install doc/ecereCOM.eCdoc $(DOCDIR)/
450         install doc/EDA.eCdoc $(DOCDIR)/
451         mkdir -p -m 777 $(SAMPLESDIR)
452         cp -pRf samples/* $(SAMPLESDIR)
453         mkdir -p -m 777 $(EXTRASDIR)
454         cp -pRf extras/* $(EXTRASDIR)
455 endif
456
457 ifndef OSX
458 ifndef WINDOWS
459 ifdef LINUX
460         install -D obj/$(PLATFORM)/lib/$(LP)ecere$(SOV) $(LIBDIR)/$(LP)ecere$(SOV)
461         install -D obj/$(PLATFORM)/lib/$(LP)ecereCOM$(SOV) $(LIBDIR)/$(LP)ecereCOM$(SOV)
462         install -D obj/$(PLATFORM)/lib/$(LP)ec$(SOV) $(LIBDIR)/$(LP)ec$(SOV)
463         install -D obj/$(PLATFORM)/lib/$(LP)EDA$(SOV) $(LIBDIR)/$(LP)EDA$(SOV)
464         install -D obj/$(PLATFORM)/lib/$(LP)EDASQLite$(SOV) $(LIBDIR)/$(LP)EDASQLite$(SOV)
465 ifdef EDASQLiteCipher
466         install -D obj/$(PLATFORM)/lib/$(LP)EDASQLiteCipher$(SOV) $(LIBDIR)/$(LP)EDASQLiteCipher$(SOV)
467 endif
468         ln -sf $(LP)ecere$(SOV) $(LIBDIR)/$(LP)ecere$(SO).0
469         ln -sf $(LP)ecereCOM$(SOV) $(LIBDIR)/$(LP)ecereCOM$(SO).0
470         ln -sf $(LP)ec$(SOV) $(LIBDIR)/$(LP)ec$(SO).0
471         ln -sf $(LP)EDA$(SOV) $(LIBDIR)/$(LP)EDA$(SO).0
472         ln -sf $(LP)EDASQLite$(SOV) $(LIBDIR)/$(LP)EDASQLite$(SO).0
473 ifdef EDASQLiteCipher
474         ln -sf $(LP)EDASQLiteCipher$(SOV) $(LIBDIR)/$(LP)EDASQLiteCipher$(SO).0
475 endif
476         ln -sf $(LP)ecere$(SOV) $(LIBDIR)/$(LP)ecere$(SO)
477         ln -sf $(LP)ecereCOM$(SOV) $(LIBDIR)/$(LP)ecereCOM$(SO)
478         ln -sf $(LP)ec$(SOV) $(LIBDIR)/$(LP)ec$(SO)
479         ln -sf $(LP)EDA$(SOV) $(LIBDIR)/$(LP)EDA$(SO)
480         ln -sf $(LP)EDASQLite$(SOV) $(LIBDIR)/$(LP)EDASQLite$(SO)
481 ifdef EDASQLiteCipher
482         ln -sf $(LP)EDASQLiteCipher$(SOV) $(LIBDIR)/$(LP)EDASQLiteCipher$(SO)
483 endif
484         install -D share/pixmaps/ecere.png $(DESTDIR)$(prefix)/share/pixmaps/ecere.png
485         install -D share/applications/ecere.desktop $(DESTDIR)$(prefix)/share/applications/ecere.desktop
486 else
487         install -D obj/$(PLATFORM)/lib/$(LP)ecere$(SO) $(LIBDIR)/$(LP)ecere$(SO)
488         install -D obj/$(PLATFORM)/lib/$(LP)ecereCOM$(SO) $(LIBDIR)/$(LP)ecereCOM$(SO)
489         install -D obj/$(PLATFORM)/lib/$(LP)ec$(SO) $(LIBDIR)/$(LP)ec$(SO)
490         install -D obj/$(PLATFORM)/lib/$(LP)EDA$(SO) $(LIBDIR)/$(LP)EDA$(SO)
491         install -D obj/$(PLATFORM)/lib/$(LP)EDASQLite$(SO) $(LIBDIR)/$(LP)EDASQLite$(SO)
492 ifdef EDASQLiteCipher
493         install -D obj/$(PLATFORM)/lib/$(LP)EDASQLiteCipher$(SO) $(LIBDIR)/$(LP)EDASQLiteCipher$(SO)
494 endif
495 endif
496         install -D obj/$(PLATFORM)/bin/ide$(E) $(BINDIR)/ide$(E)
497         install -D obj/$(PLATFORM)/bin/ear$(E) $(BINDIR)/ear$(E)
498         install -D obj/$(PLATFORM)/bin/ecc$(E) $(BINDIR)/ecc$(E)
499         install -D obj/$(PLATFORM)/bin/ecp$(E) $(BINDIR)/ecp$(E)
500         install -D obj/$(PLATFORM)/bin/ecs$(E) $(BINDIR)/ecs$(E)
501         install -D obj/$(PLATFORM)/bin/epj2make$(E) $(BINDIR)/epj2make$(E)
502         install -D obj/$(PLATFORM)/bin/documentor$(E) $(BINDIR)/documentor$(E)
503 ifdef CodeGuard
504         install -D obj/$(PLATFORM)/bin/CodeGuard$(E) $(BINDIR)/CodeGuard$(E)
505 endif
506         install -D obj/$(PLATFORM)/lib/libecereVanilla$(A) $(SLIBDIR)/libecereVanilla$(A)
507         install -D doc/tao.pdf $(DOCDIR)/"Ecere Tao of Programming [work in progress].pdf"
508         install -D doc/ecere.eCdoc $(DOCDIR)/ecere.eCdoc
509         install -D doc/ecereCOM.eCdoc $(DOCDIR)/ecereCOM.eCdoc
510         install -D doc/EDA.eCdoc $(DOCDIR)/EDA.eCdoc
511         mkdir -p -m 777 $(SAMPLESDIR)
512         cp -pRf samples/* $(SAMPLESDIR)
513         mkdir -p -m 777 $(EXTRASDIR)
514         cp -pRf extras/* $(EXTRASDIR)
515 endif
516 endif
517
518 uninstall:
519         $(call rmq,"$(LIBDIR)/$(LP)ecere$(SO)")
520         $(call rmq,"$(LIBDIR)/$(LP)ecereCOM$(SO)")
521         $(call rmq,"$(LIBDIR)/$(LP)ec$(SO)")
522         $(call rmq,"$(LIBDIR)/$(LP)EDA$(SO)")
523         $(call rmq,"$(LIBDIR)/$(LP)EDASQLite$(SO)")
524 ifdef EDASQLiteCipher
525         $(call rmq,"$(LIBDIR)/$(LP)EDASQLiteCipher$(SO)")
526 endif
527         $(call rmq,"$(BINDIR)/ide$(E)")
528         $(call rmq,"$(BINDIR)/ear$(E)")
529         $(call rmq,"$(BINDIR)/ecc$(E)")
530         $(call rmq,"$(BINDIR)/ecp$(E)")
531         $(call rmq,"$(BINDIR)/ecs$(E)")
532         $(call rmq,"$(BINDIR)/epj2make$(E)")
533         $(call rmq,"$(BINDIR)/documentor$(E)")
534 ifdef CodeGuard
535         $(call rmq,"$(BINDIR)/CodeGuard$(E)")
536 endif
537         $(call rmq,"$(SLIBDIR)/libecereVanilla$(A)")
538         $(call rmq,"$(DOCDIR)/Ecere Tao of Programming [work in progress].pdf")
539         $(call rmq,"$(DOCDIR)/ecere.eCdoc")
540         $(call rmq,"$(DOCDIR)/ecereCOM.eCdoc")
541         $(call rmq,"$(DOCDIR)/EDA.eCdoc")
542 ifdef LINUX
543         $(call rmq,"$(LIBDIR)/$(LP)ecere$(SO).0")
544         $(call rmq,"$(LIBDIR)/$(LP)ecereCOM$(SO).0")
545         $(call rmq,"$(LIBDIR)/$(LP)ec$(SO).0")
546         $(call rmq,"$(LIBDIR)/$(LP)EDA$(SO).0")
547         $(call rmq,"$(LIBDIR)/$(LP)EDASQLite$(SO).0")
548 ifdef EDASQLiteCipher
549         $(call rmq,"$(LIBDIR)/$(LP)EDASQLiteCipher$(SO).0")
550 endif
551         $(call rmq,"$(LIBDIR)/$(LP)ecere$(SOV)")
552         $(call rmq,"$(LIBDIR)/$(LP)ecereCOM$(SOV)")
553         $(call rmq,"$(LIBDIR)/$(LP)ec$(SOV)")
554         $(call rmq,"$(LIBDIR)/$(LP)EDA$(SOV)")
555         $(call rmq,"$(LIBDIR)/$(LP)EDASQLite$(SOV)")
556 ifdef EDASQLiteCipher
557         $(call rmq,"$(LIBDIR)/$(LP)EDASQLiteCipher$(SOV)")
558 endif
559         $(call rmq,"$(DESTDIR)$(prefix)/share/pixmaps/ecere.png")
560         $(call rmq,"$(DESTDIR)$(prefix)/share/applications/ecere.desktop")
561 endif
562         $(call rmdirq,"$(BINDIR)/")
563         $(call rmdirq,"$(LIBDIR)/")
564         $(call rmdirq,"$(SLIBDIR)/")
565         $(call rmdirq,"$(DOCDIR)/")
566 ifdef WINDOWS
567         $(call rmdirq,"$(DESTDIR)/")
568 endif
569         @$(call echo,The Ecere SDK has been uninstalled.)
570
571 troubleshoot:
572         @$(call echo,Printing values of some variables.)
573         @$(call echo,CCACHE=$(CCACHE))
574         @$(call echo,CCACHE_COMPILE=$(CCACHE_COMPILE))
575         @$(call echo,CCACHE_PREFIX=$(CCACHE_PREFIX))
576         @$(call echo,DISTCC=$(DISTCC))
577         @$(call echo,CC=$(CC))
578         @$(call echo,CPP=$(CPP))
579         @$(call echo,ECP=$(ECP))
580         @$(call echo,ECC=$(ECC))
581         @$(call echo,ECS=$(ECS))
582         @$(call echo,EAR=$(EAR))
583         @$(call echo,AS=$(AS))
584         @$(call echo,LD=$(LD))
585         @$(call echo,AR=$(AR))
586         @$(call echo,STRIP=$(STRIP))
587         @$(call echo,UPX=$(UPX))