42 |
42 |
43 ## Common build steps (compiling and cleaning) |
43 ## Common build steps (compiling and cleaning) |
44 include $(FLMHOME)/tools2common.flm |
44 include $(FLMHOME)/tools2common.flm |
45 |
45 |
46 ## Static libraries |
46 ## Static libraries |
|
47 STATICLIBS:= |
47 ifneq ($(STATICLIBRARY),) |
48 ifneq ($(STATICLIBRARY),) |
48 STATICLIBS:=$(patsubst %,$(RELEASEPATH)/lib%.a,$(STATICLIBRARY)) |
49 STATICLIBS:=$(patsubst %,$(RELEASEPATH)/lib%.a,$(STATICLIBRARY)) |
49 LLIBS:=$(OPT.L)"$(RELEASEPATH)" $(patsubst %,$(OPT.l)%,$(STATICLIBRARY)) |
50 endif |
50 # |
51 |
|
52 ifneq ($(STLPORTLIBRARY),) |
|
53 STATICLIBS:=$(STATICLIBS) $(STLPORTBINDIR)/lib$(STLPORTLIBRARY).a |
|
54 endif |
|
55 |
|
56 # System dynamic libraries (e.g. pthreads) |
|
57 LLIBS:= |
51 ifneq ($(SYSTEMLIBS),) |
58 ifneq ($(SYSTEMLIBS),) |
52 LLIBS:=$(LLIBS) $(patsubst %,$(OPT.l)%,$(SYSTEMLIBS)) |
59 LLIBS:=$(patsubst %,$(OPT.l)%,$(SYSTEMLIBS)) |
53 endif |
|
54 # |
|
55 endif |
60 endif |
56 |
61 |
57 ## Link executable |
62 ## Link executable |
58 # get OBJECTFILES from call to tools2common |
63 # get OBJECTFILES from call to tools2common |
59 define tools2linkexe |
64 define tools2linkexe |
60 $(EXETARGET): $(OBJECTFILES) $(STATICLIBS) |
65 $(EXETARGET): $(OBJECTFILES) $(STATICLIBS) |
61 $(call startrule,tools2linkexe) \ |
66 $(call startrule,tools2linkexe) \ |
62 $(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(LLIBS) $(LINKER_OPTIONS) \ |
67 $(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(STATICLIBS) $(LLIBS) $(LINKER_OPTIONS) \ |
63 $(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \ |
68 $(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \ |
64 $(call endrule,tools2linkexe) |
69 $(call endrule,tools2linkexe) |
65 |
70 |
66 endef |
71 endef |
67 |
72 |