2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

windows fixes

git-svn-id: svn+q:///qpdf/trunk@775 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-10-11 00:13:28 +00:00
parent 64a890db2b
commit 9e05a15d7b
4 changed files with 17 additions and 16 deletions

View File

@ -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 INCLUDES_external-libs = external-libs/zlib external-libs/pcre
SRCS_external-libs_zlib = \ 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)/$(call binname,dftables) \
external-libs/$(OUTPUT_DIR)/chartables.c 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))) 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) OBJS_external-libs = $(OBJS_external-libs_zlib) $(OBJS_external-libs_pcre)
x:
@echo $(call lobj_to_dep,$(OBJS_external-libs))
ifeq ($(GENDEPS),1) ifeq ($(GENDEPS),1)
-include $(call lobj_to_dep,$(OBJS_external-libs)) -include $(call lobj_to_dep,$(OBJS_external-libs))
endif endif
@ -54,3 +48,12 @@ $(OBJS_external-libs_pcre): external-libs/$(OUTPUT_DIR)/%.$(LOBJ): external-libs
$(TARGETS_external-libs): $(OBJS_external-libs) $(TARGETS_external-libs): $(OBJS_external-libs)
$(call makeslib,$(OBJS_external-libs),$(TARGETS_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),$@)

View File

@ -47,7 +47,6 @@ endef
# 1 2 3 4 5 # 1 2 3 4 5
# Usage: $(call makelib,objs,library,current,revision,age) # Usage: $(call makelib,objs,library,current,revision,age)
define makelib 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); \ 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 \ $(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(3).dll \
$(1) $(LDFLAGS) $(LIBS) $(1) $(LDFLAGS) $(LIBS)

View File

@ -28,7 +28,7 @@ endef
define c_compile define c_compile
cl /nologo /Zi /Gy /EHsc /MD $(CPPFLAGS) $(CXXFLAGS) \ cl /nologo /Zi /Gy /EHsc /MD $(CPPFLAGS) $(CXXFLAGS) \
$(foreach I,$(2),-I$(I)) \ $(foreach I,$(2),-I$(I)) \
/c $(1) /Fo$(call src_to_obj,$(1)) /c $(1) /Fo$(call c_src_to_obj,$(1))
endef endef
libcompile = $(compile) libcompile = $(compile)
@ -43,11 +43,10 @@ endef
# 1 2 3 4 5 # 1 2 3 4 5
# Usage: $(call makelib,objs,library,current,revision,age) # Usage: $(call makelib,objs,library,current,revision,age)
define makelib define makelib
dll= cl /nologo /Zi /Gy /EHsc /MD /LD /Fe$(basename $(2))$(3).dll $(1) \
cl /nologo /Zi /Gy /EHsc /MD /TP /GR /LD /Fe$(basename $(2))$(3).dll \
/link /incremental:no \ /link /incremental:no \
$(foreach L,$(subst -L,,$(LDFLAGS)),/LIBPATH:$(L)) \ $(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 \ if [ -f $(basename $(2))$(3).dll.manifest ]; then \
mt.exe -nologo -manifest $(basename $(2))$(3).dll.manifest \ mt.exe -nologo -manifest $(basename $(2))$(3).dll.manifest \
-outputresource:$(basename $(2))$(3).dll\;2; \ -outputresource:$(basename $(2))$(3).dll\;2; \
@ -57,10 +56,10 @@ endef
# 1 2 # 1 2
# Usage: $(call makebin,objs,binary) # Usage: $(call makebin,objs,binary)
define makebin define makebin
cl /nologo /Zi /Gy /EHsc /MD /TP /GR /OUT:$(2) \ cl /nologo /Zi /Gy /EHsc /MD $(1) \
/link /incremental:no \ /link /incremental:no /OUT:$(2) \
$(foreach L,$(subst -L,,$(LDFLAGS)),/LIBPATH:$(L)) \ $(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 \ if [ -f $(2).manifest ]; then \
mt.exe -nologo -manifest $(2).manifest \ mt.exe -nologo -manifest $(2).manifest \
-outputresource:$(2)\;2; \ -outputresource:$(2)\;2; \

View File

@ -15,7 +15,7 @@ ifeq ($(GENDEPS),1)
-include $(call obj_to_dep,$(OBJS_zlib-flate)) -include $(call obj_to_dep,$(OBJS_zlib-flate))
endif 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)) $(call compile,$<,$(INCLUDES_zlib-flate))
zlib-flate/$(OUTPUT_DIR)/$(call binname,zlib-flate): $(OBJS_zlib-flate) zlib-flate/$(OUTPUT_DIR)/$(call binname,zlib-flate): $(OBJS_zlib-flate)