Commit a6915c5da21a7c3233c8c7127d0b4d81aa9e1b40
1 parent
caa397ed
mingw -- untested
git-svn-id: svn+q:///qpdf/trunk@754 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing
1 changed file
with
52 additions
and
0 deletions
make/mingw.mk
0 → 100644
| 1 | +# --- Required interface definitions --- | |
| 2 | + | |
| 3 | +OBJ=o | |
| 4 | +LOBJ=o | |
| 5 | + | |
| 6 | +# Usage: $(call libname,base) | |
| 7 | +define libname | |
| 8 | +lib$(1).a | |
| 9 | +endef | |
| 10 | + | |
| 11 | +# Usage: $(call binname,base) | |
| 12 | +define binname | |
| 13 | +$(1) | |
| 14 | +endef | |
| 15 | + | |
| 16 | +# --- Required rule definitions --- | |
| 17 | + | |
| 18 | +# 1 2 | |
| 19 | +# Usage: $(call compile,src,includes) | |
| 20 | +define compile | |
| 21 | + $(CXX) $(CPPFLAGS) $(CXXFLAGS) \ | |
| 22 | + $(call depflags,$(basename $(call src_to_obj,$(1)))) \ | |
| 23 | + $(foreach I,$(2),-I$(I)) \ | |
| 24 | + -c $(1) -o $(call src_to_obj,$(1)) | |
| 25 | +endef | |
| 26 | + | |
| 27 | +# 1 2 | |
| 28 | +# Usage: $(call c_compile,src,includes) | |
| 29 | +define c_compile | |
| 30 | + $(CC) $(CPPFLAGS) $(CFLAGS) \ | |
| 31 | + $(call depflags,$(basename $(call src_to_obj,$(1)))) \ | |
| 32 | + $(foreach I,$(2),-I$(I)) \ | |
| 33 | + -c $(1) -o $(call c_src_to_obj,$(1)) | |
| 34 | +endef | |
| 35 | + | |
| 36 | +libcompile = $(compile) | |
| 37 | + | |
| 38 | +# 1 2 3 4 5 | |
| 39 | +# Usage: $(call makelib,objs,library,current,revision,age) | |
| 40 | +define makelib | |
| 41 | + ar cru $(2) $(1); | |
| 42 | + ranlib $(2); | |
| 43 | + dlltool -l $(2) -D `echo $(2) | sed -e 's,lib\(.*\).a,\1'`$(3).dll \ | |
| 44 | + $(1) $(LDFLAGS) $(LIBS) | |
| 45 | +endef | |
| 46 | + | |
| 47 | +# 1 2 | |
| 48 | +# Usage: $(call makebin,objs,binary) | |
| 49 | +define makebin | |
| 50 | + $(CXX) $(CXXFLAGS) $(1) -o $(2) $(LDFLAGS) \ | |
| 51 | + -Llibqpdf/$(OUTPUT_DIR) -lqpdf $(LIBS) | |
| 52 | +endef | ... | ... |