1 ###########################################################################
2 # $Id$
3 ###########################################################################
4 # Makefile for building with MinGW
5 ###########################################################################
7 include ../Makefile.mingw.common
9 all: generated outputs
11 ###################################
12 # G E N E R A T E D F I L E S
13 ###################################
15 generated: helper/sp-marshal.h helper/sp-marshal.cpp inkscape_version.h
19 helper/sp-marshal.h: helper/sp-marshal.h.mingw
20 $(CP) $(subst /,$(S), $<) $(subst /,$(S), $@)
22 helper/sp-marshal.cpp: helper/sp-marshal.cpp.mingw
23 $(CP) $(subst /,$(S), $<) $(subst /,$(S), $@)
25 inkscape_version.h: inkscape_version.h.mingw
26 $(CP) inkscape_version.h.mingw inkscape_version.h
29 ###################################
30 # D E P E N D E N C I E S
31 ###################################
33 include ./make.ofiles
34 include ./make.dep
36 INC += $(INCLUDEPATH)
38 OBJ = $(OBJECTS)
42 ###################################
43 # O U T P U T S
44 ###################################
46 outputs: inkscape.exe inkview.exe
49 RES=inkres.o
51 inkscape.exe: libinkscape.a main.o winmain.o $(RES)
52 $(CXX) --export-dynamic -o inkscape.exe main.o winmain.o $(RES) libinkscape.a $(LIBS)
53 # strip inkscape.exe
55 # DLL version. we need to make this work
56 #inkscape.exe: inkscape.dll main.o winmain.o $(RES)
57 # $(CXX) -o inkscape.exe main.o winmain.o $(RES) inkscape.la $(LIBS)
58 # strip inkscape.exe
60 inkview.exe: libinkscape.a inkview.o $(RES)
61 $(CXX) -o inkview.exe inkview.o $(RES) libinkscape.a $(LIBS)
62 # strip inkview.exe
64 # DLL version. we need to make this work
65 # inkview.exe: inkscape.dll inkview.o $(RES)
66 # $(CXX) -o inkview.exe inkview.o $(RES) libinkscapedll.a $(LIBS)
67 # strip inkview.exe
69 inkres.o: inkscape.rc
70 $(WINDRES) inkscape.rc $(RES)
72 inkscape.dll: libinkscape.a inkscape.def
73 $(DLLWRAP) --output-lib=inkscape.la \
74 --def=inkscape.def --driver-name=g++ \
75 -o inkscape.dll libinkscape.a $(LIBS)
77 inkscape.def: libinkscape.a
78 perl makedef.pl
80 libinkscape.a: $(OBJ)
81 -$(RM) libinkscape.a
82 ar crv libinkscape.a $(OBJ)
83 $(RANLIB) libinkscape.a
85 inkscape.la: inkscape.dll
89 ###################################
90 # P L U G I N S
91 ###################################
93 .o.dll: $<
94 $(DLLWRAP) --def=plugin.def --driver-name=g++ \
95 -o $@ $< $(LIBS)
97 PLUGS = extension/plugin/gimpgrad.dll
99 plugins: $(PLUGS)
101 extension/plugin/gimpgrad.dll: extension/plugin/gimpgrad.o inkscape.la
102 $(DLLWRAP) --def=plugin.def --driver-name=g++ \
103 -dllname $@ $< inkscape.la $(LIBS) -lgc
104 strip $@
109 ###################################
110 # C L E A N U P
111 ###################################
113 clean:
114 $(foreach a, $(OBJ), $(shell $(RM) $(subst /,$(S), $(a))))
115 -$(RM) main.o winmain.o inkview.o
116 -$(RM) *.a
117 -$(RM) *.la
118 -$(RM) inkscape.def
119 -$(RM) *.dll
120 -$(RM) extension$(S)plugin$(S)*.o
121 -$(RM) extension$(S)plugin$(S)*.dll