diff options
-rw-r--r-- | make/gcc-linux.mk | 6 | ||||
-rw-r--r-- | make/libtool.mk | 13 | ||||
-rw-r--r-- | make/mingw.mk | 2 |
3 files changed, 16 insertions, 5 deletions
diff --git a/make/gcc-linux.mk b/make/gcc-linux.mk index 6124357b..a7e7e26b 100644 --- a/make/gcc-linux.mk +++ b/make/gcc-linux.mk @@ -35,15 +35,15 @@ endef define libcompile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fpic \ - $(call depflags,$(basename $(call src_to_obj,$(1)))) \ + $(call depflags,$(basename $(call src_to_lobj,$(1)))) \ $(foreach I,$(2),-I$(I)) \ - -c $(1) -o $(call src_to_obj,$(1)) + -c $(1) -o $(call src_to_lobj,$(1)) endef define c_libcompile $(CC) $(CPPFLAGS) $(CXXFLAGS) -fpic \ $(call depflags,$(basename $(call c_src_to_lobj,$(1)))) \ $(foreach I,$(2),-I$(I)) \ - -c $(1) -o $(call c_src_to_obj,$(1)) + -c $(1) -o $(call c_src_to_lobj,$(1)) endef diff --git a/make/libtool.mk b/make/libtool.mk index c0e6e52b..bc4ec120 100644 --- a/make/libtool.mk +++ b/make/libtool.mk @@ -41,7 +41,7 @@ endef # Usage: $(call c_compile,src,includes) define c_compile $(CC) $(CPPFLAGS) $(CFLAGS) \ - $(call depflags,$(basename $(call src_to_obj,$(1)))) \ + $(call depflags,$(basename $(call c_src_to_obj,$(1)))) \ $(foreach I,$(2),-I$(I)) \ -c $(1) -o $(call c_src_to_obj,$(1)) endef @@ -57,6 +57,17 @@ define libcompile $(call fixdeps,$(basename $(call src_to_obj,$(1)))) endef +# 1 2 +# Usage: $(call libcompile,src,includes) +define c_libcompile + $(LIBTOOL) --quiet --mode=compile \ + $(CC) $(CPPFLAGS) $(CXXFLAGS) \ + $(call libdepflags,$(basename $(call c_src_to_obj,$(1)))) \ + $(foreach I,$(2),-I$(I)) \ + -c $(1) -o $(call c_src_to_obj,$(1)); \ + $(call fixdeps,$(basename $(call src_to_obj,$(1)))) +endef + # 1 2 # Usage: $(call makeslib,objs,library) define makeslib diff --git a/make/mingw.mk b/make/mingw.mk index e8ad460a..7ab66381 100644 --- a/make/mingw.mk +++ b/make/mingw.mk @@ -10,7 +10,7 @@ endef # Usage: $(call binname,base) define binname -$(1) +$(1).exe endef # --- Required rule definitions --- |