Commit 9e05a15d7b3ed099fcc605b782c1f0ca6326dde2
1 parent
64a890db
windows fixes
git-svn-id: svn+q:///qpdf/trunk@775 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing
4 changed files
with
17 additions
and
16 deletions
external-libs/build.mk
| 1 | -TARGETS_external-libs = external-libs/$(OUTPUT_DIR)/libexternal.a | |
| 1 | +TARGETS_external-libs = external-libs/$(OUTPUT_DIR)/$(call libname,external) | |
| 2 | 2 | INCLUDES_external-libs = external-libs/zlib external-libs/pcre |
| 3 | 3 | |
| 4 | 4 | SRCS_external-libs_zlib = \ |
| ... | ... | @@ -29,9 +29,6 @@ external-libs/$(OUTPUT_DIR)/chartables.c: external-libs/$(OUTPUT_DIR)/$(call bin |
| 29 | 29 | external-libs/$(OUTPUT_DIR)/$(call binname,dftables) \ |
| 30 | 30 | external-libs/$(OUTPUT_DIR)/chartables.c |
| 31 | 31 | |
| 32 | -external-libs/$(OUTPUT_DIR)/$(call binname,dftables): | |
| 33 | - $(CC) -o $@ external-libs/pcre/dftables.c | |
| 34 | - | |
| 35 | 32 | # ----- |
| 36 | 33 | |
| 37 | 34 | 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 |
| 39 | 36 | |
| 40 | 37 | OBJS_external-libs = $(OBJS_external-libs_zlib) $(OBJS_external-libs_pcre) |
| 41 | 38 | |
| 42 | -x: | |
| 43 | - @echo $(call lobj_to_dep,$(OBJS_external-libs)) | |
| 44 | - | |
| 45 | 39 | ifeq ($(GENDEPS),1) |
| 46 | 40 | -include $(call lobj_to_dep,$(OBJS_external-libs)) |
| 47 | 41 | endif |
| ... | ... | @@ -54,3 +48,12 @@ $(OBJS_external-libs_pcre): external-libs/$(OUTPUT_DIR)/%.$(LOBJ): external-libs |
| 54 | 48 | |
| 55 | 49 | $(TARGETS_external-libs): $(OBJS_external-libs) |
| 56 | 50 | $(call makeslib,$(OBJS_external-libs),$(TARGETS_external-libs)) |
| 51 | + | |
| 52 | +OBJS_dftables = $(call c_src_to_obj,external-libs/pcre/dftables.c) | |
| 53 | + | |
| 54 | +$(OBJS_dftables): external-libs/pcre/dftables.c | |
| 55 | + $(call c_compile,$<,) | |
| 56 | + | |
| 57 | +external-libs/$(OUTPUT_DIR)/$(call binname,dftables): LIBS= | |
| 58 | +external-libs/$(OUTPUT_DIR)/$(call binname,dftables): $(OBJS_dftables) | |
| 59 | + $(call makebin,$(OBJS_dftables),$@) | ... | ... |
make/mingw.mk
| ... | ... | @@ -47,7 +47,6 @@ endef |
| 47 | 47 | # 1 2 3 4 5 |
| 48 | 48 | # Usage: $(call makelib,objs,library,current,revision,age) |
| 49 | 49 | define makelib |
| 50 | - echo `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll | |
| 51 | 50 | dlltool -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll) $(1); \ |
| 52 | 51 | $(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll \ |
| 53 | 52 | $(1) $(LDFLAGS) $(LIBS) | ... | ... |
make/msvc.mk
| ... | ... | @@ -28,7 +28,7 @@ endef |
| 28 | 28 | define c_compile |
| 29 | 29 | cl /nologo /Zi /Gy /EHsc /MD $(CPPFLAGS) $(CXXFLAGS) \ |
| 30 | 30 | $(foreach I,$(2),-I$(I)) \ |
| 31 | - /c $(1) /Fo$(call src_to_obj,$(1)) | |
| 31 | + /c $(1) /Fo$(call c_src_to_obj,$(1)) | |
| 32 | 32 | endef |
| 33 | 33 | |
| 34 | 34 | libcompile = $(compile) |
| ... | ... | @@ -43,11 +43,10 @@ endef |
| 43 | 43 | # 1 2 3 4 5 |
| 44 | 44 | # Usage: $(call makelib,objs,library,current,revision,age) |
| 45 | 45 | define makelib |
| 46 | - dll= | |
| 47 | - cl /nologo /Zi /Gy /EHsc /MD /TP /GR /LD /Fe$(basename $(2))$(3).dll \ | |
| 46 | + cl /nologo /Zi /Gy /EHsc /MD /LD /Fe$(basename $(2))$(3).dll $(1) \ | |
| 48 | 47 | /link /incremental:no \ |
| 49 | 48 | $(foreach L,$(subst -L,,$(LDFLAGS)),/LIBPATH:$(L)) \ |
| 50 | - $(foreach L,$(subst -l,,$(LIBS)),$(L).lib) $(1) | |
| 49 | + $(foreach L,$(subst -l,,$(LIBS)),$(L).lib) | |
| 51 | 50 | if [ -f $(basename $(2))$(3).dll.manifest ]; then \ |
| 52 | 51 | mt.exe -nologo -manifest $(basename $(2))$(3).dll.manifest \ |
| 53 | 52 | -outputresource:$(basename $(2))$(3).dll\;2; \ |
| ... | ... | @@ -57,10 +56,10 @@ endef |
| 57 | 56 | # 1 2 |
| 58 | 57 | # Usage: $(call makebin,objs,binary) |
| 59 | 58 | define makebin |
| 60 | - cl /nologo /Zi /Gy /EHsc /MD /TP /GR /OUT:$(2) \ | |
| 61 | - /link /incremental:no \ | |
| 59 | + cl /nologo /Zi /Gy /EHsc /MD $(1) \ | |
| 60 | + /link /incremental:no /OUT:$(2) \ | |
| 62 | 61 | $(foreach L,$(subst -L,,$(LDFLAGS)),/LIBPATH:$(L)) \ |
| 63 | - $(foreach L,$(subst -l,,$(LIBS)),$(L).lib) $(1) | |
| 62 | + $(foreach L,$(subst -l,,$(LIBS)),$(L).lib) | |
| 64 | 63 | if [ -f $(2).manifest ]; then \ |
| 65 | 64 | mt.exe -nologo -manifest $(2).manifest \ |
| 66 | 65 | -outputresource:$(2)\;2; \ | ... | ... |
zlib-flate/build.mk
| ... | ... | @@ -15,7 +15,7 @@ ifeq ($(GENDEPS),1) |
| 15 | 15 | -include $(call obj_to_dep,$(OBJS_zlib-flate)) |
| 16 | 16 | endif |
| 17 | 17 | |
| 18 | -$(OBJS_zlib-flate): zlib-flate/$(OUTPUT_DIR)/%.o: zlib-flate/%.cc | |
| 18 | +$(OBJS_zlib-flate): zlib-flate/$(OUTPUT_DIR)/%.$(OBJ): zlib-flate/%.cc | |
| 19 | 19 | $(call compile,$<,$(INCLUDES_zlib-flate)) |
| 20 | 20 | |
| 21 | 21 | zlib-flate/$(OUTPUT_DIR)/$(call binname,zlib-flate): $(OBJS_zlib-flate) | ... | ... |