diff --git a/external-libs/build.mk b/external-libs/build.mk index 7c694bbb..9dfa0bce 100644 --- a/external-libs/build.mk +++ b/external-libs/build.mk @@ -1,4 +1,4 @@ -TARGETS_external-libs = external-libs/$(OUTPUT_DIR)/libexternal.a +TARGETS_external-libs = external-libs/$(OUTPUT_DIR)/$(call libname,external) INCLUDES_external-libs = external-libs/zlib external-libs/pcre SRCS_external-libs_zlib = \ @@ -29,9 +29,6 @@ external-libs/$(OUTPUT_DIR)/chartables.c: external-libs/$(OUTPUT_DIR)/$(call bin external-libs/$(OUTPUT_DIR)/$(call binname,dftables) \ external-libs/$(OUTPUT_DIR)/chartables.c -external-libs/$(OUTPUT_DIR)/$(call binname,dftables): - $(CC) -o $@ external-libs/pcre/dftables.c - # ----- OBJS_external-libs_zlib = $(call c_src_to_lobj,$(subst zlib/,,$(SRCS_external-libs_zlib))) @@ -39,9 +36,6 @@ OBJS_external-libs_pcre = $(call c_src_to_lobj,$(subst pcre/,,$(SRCS_external-li OBJS_external-libs = $(OBJS_external-libs_zlib) $(OBJS_external-libs_pcre) -x: - @echo $(call lobj_to_dep,$(OBJS_external-libs)) - ifeq ($(GENDEPS),1) -include $(call lobj_to_dep,$(OBJS_external-libs)) endif @@ -54,3 +48,12 @@ $(OBJS_external-libs_pcre): external-libs/$(OUTPUT_DIR)/%.$(LOBJ): external-libs $(TARGETS_external-libs): $(OBJS_external-libs) $(call makeslib,$(OBJS_external-libs),$(TARGETS_external-libs)) + +OBJS_dftables = $(call c_src_to_obj,external-libs/pcre/dftables.c) + +$(OBJS_dftables): external-libs/pcre/dftables.c + $(call c_compile,$<,) + +external-libs/$(OUTPUT_DIR)/$(call binname,dftables): LIBS= +external-libs/$(OUTPUT_DIR)/$(call binname,dftables): $(OBJS_dftables) + $(call makebin,$(OBJS_dftables),$@) diff --git a/make/mingw.mk b/make/mingw.mk index 7ab66381..f0442c96 100644 --- a/make/mingw.mk +++ b/make/mingw.mk @@ -47,7 +47,6 @@ endef # 1 2 3 4 5 # Usage: $(call makelib,objs,library,current,revision,age) define makelib - echo `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll dlltool -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll) $(1); \ $(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll \ $(1) $(LDFLAGS) $(LIBS) diff --git a/make/msvc.mk b/make/msvc.mk index de77e0fe..b60abc03 100644 --- a/make/msvc.mk +++ b/make/msvc.mk @@ -28,7 +28,7 @@ endef define c_compile cl /nologo /Zi /Gy /EHsc /MD $(CPPFLAGS) $(CXXFLAGS) \ $(foreach I,$(2),-I$(I)) \ - /c $(1) /Fo$(call src_to_obj,$(1)) + /c $(1) /Fo$(call c_src_to_obj,$(1)) endef libcompile = $(compile) @@ -43,11 +43,10 @@ endef # 1 2 3 4 5 # Usage: $(call makelib,objs,library,current,revision,age) define makelib - dll= - cl /nologo /Zi /Gy /EHsc /MD /TP /GR /LD /Fe$(basename $(2))$(3).dll \ + cl /nologo /Zi /Gy /EHsc /MD /LD /Fe$(basename $(2))$(3).dll $(1) \ /link /incremental:no \ $(foreach L,$(subst -L,,$(LDFLAGS)),/LIBPATH:$(L)) \ - $(foreach L,$(subst -l,,$(LIBS)),$(L).lib) $(1) + $(foreach L,$(subst -l,,$(LIBS)),$(L).lib) if [ -f $(basename $(2))$(3).dll.manifest ]; then \ mt.exe -nologo -manifest $(basename $(2))$(3).dll.manifest \ -outputresource:$(basename $(2))$(3).dll\;2; \ @@ -57,10 +56,10 @@ endef # 1 2 # Usage: $(call makebin,objs,binary) define makebin - cl /nologo /Zi /Gy /EHsc /MD /TP /GR /OUT:$(2) \ - /link /incremental:no \ + cl /nologo /Zi /Gy /EHsc /MD $(1) \ + /link /incremental:no /OUT:$(2) \ $(foreach L,$(subst -L,,$(LDFLAGS)),/LIBPATH:$(L)) \ - $(foreach L,$(subst -l,,$(LIBS)),$(L).lib) $(1) + $(foreach L,$(subst -l,,$(LIBS)),$(L).lib) if [ -f $(2).manifest ]; then \ mt.exe -nologo -manifest $(2).manifest \ -outputresource:$(2)\;2; \ diff --git a/zlib-flate/build.mk b/zlib-flate/build.mk index 87309a59..f4cca29d 100644 --- a/zlib-flate/build.mk +++ b/zlib-flate/build.mk @@ -15,7 +15,7 @@ ifeq ($(GENDEPS),1) -include $(call obj_to_dep,$(OBJS_zlib-flate)) endif -$(OBJS_zlib-flate): zlib-flate/$(OUTPUT_DIR)/%.o: zlib-flate/%.cc +$(OBJS_zlib-flate): zlib-flate/$(OUTPUT_DIR)/%.$(OBJ): zlib-flate/%.cc $(call compile,$<,$(INCLUDES_zlib-flate)) zlib-flate/$(OUTPUT_DIR)/$(call binname,zlib-flate): $(OBJS_zlib-flate)