Mercurial > hg > easyhg-kdiff3
comparison kdiff3/diff_ext_for_kdiff3/Makefile @ 75:08ea9b86c12c
KDiff3-0.9.91
author | joachim99 |
---|---|
date | Sat, 04 Nov 2006 00:05:00 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
74:069521efec1a | 75:08ea9b86c12c |
---|---|
1 # Project: diff_ext | |
2 # Generates diff_ext_for_kdiff3.dll with gcc. | |
3 # Can be used for Cygwin and MingW (MingW ignores -mno-cygwin) | |
4 # | |
5 PROJ := diff_ext_for_kdiff3 | |
6 | |
7 CXX ?= g++.exe | |
8 | |
9 ifdef DEBUG | |
10 CXXFLAGS ?= -g | |
11 else | |
12 CXXFLAGS ?= -Os | |
13 LDFLAGS += -s | |
14 endif | |
15 CXXFLAGS += -ansi -pedantic -Wall -W -D_UNICODE -DUNICODE | |
16 | |
17 LIBS := -luuid -lole32 | |
18 DEFFILE = $(PROJ).def | |
19 STATICLIB = $(PROJ).a | |
20 EXPLIB = $(PROJ).exp | |
21 | |
22 SRC-CXX = $(wildcard *.cpp) | |
23 SRC-RC = $(wildcard *.rc) | |
24 | |
25 OBJ := $(SRC-CXX:.cpp=.o) | |
26 RES := $(SRC-RC:.rc=.res) | |
27 OBJ += $(RES) | |
28 DLL := $(PROJ).dll | |
29 | |
30 .PHONY: all clean | |
31 | |
32 .SUFFIXES: .rc .res | |
33 | |
34 all: .depend $(DLL) | |
35 | |
36 debug: | |
37 $(MAKE) DEBUG=YES UNICODE=YES | |
38 | |
39 release: | |
40 $(MAKE) | |
41 | |
42 .depend: Makefile $(SRC-RC) $(SRC-CXX) | |
43 $(CXX) -M $(CXXFLAGS) $(SRC-RC) $(SRC-CXX) > .depend | |
44 | |
45 include .depend | |
46 | |
47 clean: clean-custom | |
48 ${RM} $(OBJ) $(DLL) ${EXPLIB} $(STATICLIB) | |
49 | |
50 $(DLL): $(OBJ) | |
51 dllwrap.exe \ | |
52 --mno-cygwin \ | |
53 --def $(DEFFILE) \ | |
54 --output-exp ${EXPLIB} \ | |
55 --driver-name c++ -L/usr/local/lib -L/usr/lib/mingw \ | |
56 --implib $(STATICLIB) \ | |
57 $(OBJ) $(LDFLAGS) $(LIBS) \ | |
58 -o $@ | |
59 | |
60 .cpp.o: | |
61 $(CXX) $(CXXFLAGS) -c $< -o $@ | |
62 | |
63 .rc.res: | |
64 windres.exe $< -J rc -o $@ -O coff -DMING |