2006-12-03 Dimitris Glezos <dimitris@glezos.com>
[dia.git] / objects / makefile.mingw
blobb03593f2af80dd3df2d207c0485f64eca1e0a7f8
1 # Makefile for mingw (with gnu make, but without bash), use :
2 # make -f makefile.mingw
4 # OPTIMIZE = -g
6 ifndef PACKAGE
8 PLUGINS = chronogram custom er flowchart fs grafcet \
9                 network sadt standard uml 
11 # The main target
12 all : sub-all
14 sub-all : 
15         for %%d in ($(PLUGINS)) do make --no-print-directory -f makefile.mingw sub-one THIS=%%d
17 sub-one:
18         $(MAKE) -C $(THIS) -f ../makefile.mingw $(THIS).dll PACKAGE=$(THIS) OBJ_$(THIS)=1
20 else
22 TOP = ../../..
23 include $(TOP)/glib/build/win32/make.mingw
24 PRJ_TOP = ../..
25 PKG_DEF = ../objects.def
27 PKG_CFLAGS = $(GLIB_CFLAGS) $(GTK2_CFLAGS) $(INTL_CFLAGS) \
28         $(LIBXML2_CFLAGS) -I$(PRJ_TOP)/lib \
30 PKG_LINK = $(GTK2_LIBS) $(GLIB_LIBS) $(INTL_LIBS) \
31         $(LIBXML2_LIBS) \
32         -L $(PRJ_TOP)/lib -llibdia
35 # Object definitions for the various plugins
38 ifdef OBJ_chronogram
39 OBJECTS = \
40         chronogram.o \
41         chronoline.o \
42         chronoline_event.o \
43         chronoref.o
45 endif
47 ifdef OBJ_custom
48 OBJECTS = \
49         custom.o \
50         custom_object.o \
51         custom_util.o \
52         shape_info.o
53 endif
55 ifdef OBJ_eml
56 OBJECTS = \
57         dbox.o \
58         eml.o \
59         instantiation.o \
60         interaction.o \
61         interaction-ortho.o \
62         listfun.o \
63         nlist.o \
64         process.o \
65         process_dialog.o
66 endif
68 ifdef OBJ_er
69 OBJECTS = \
70         attribute.o \
71         entity.o \
72         er.o \
73         participation.o \
74         relationship.o
75 endif
77 ifdef OBJ_flowchart
78 OBJECTS = \
79         box.o \
80         diamond.o \
81         ellipse.o \
82         flowchart.o \
83         parallelogram.o
84 endif
86 ifdef OBJ_fs
87 OBJECTS = \
88         flow.o \
89         flow-ortho.o \
90         fs.o \
91         function.o
92 endif
94 ifdef OBJ_grafcet
95 OBJECTS = \
96         action.o \
97         action_text_draw.o \
98         boolequation.o \
99         condition.o \
100         grafcet.o \
101         step.o \
102         transition.o \
103         vector.o \
104         vergent.o
105 endif
107 ifdef OBJ_labels
108 OBJECTS = \
109         labels.o \
110         labelline.o \
111         labeltextobj.o
112 endif
114 ifdef OBJ_network
115 OBJECTS = \
116         bus.o \
117         network.o \
118         wanlink.o
119 endif
121 ifdef OBJ_sadt
122 OBJECTS = \
123         annotation.o \
124         arrow.o \
125         box.o \
126         sadt.o
127 endif
129 ifdef OBJ_standard
130 OBJECTS = \
131         arc.o \
132         bezier.o \
133         beziergon.o \
134         box.o \
135         ellipse.o \
136         image.o \
137         line.o \
138         polygon.o
139         polyline.o \
140         standard.o \
141         textobj.o \
142         zigzagline.o
143 endif
145 ifdef OBJ_sybase
146 OBJECTS = \
147         sybase.o
148 endif
150 ifdef OBJ_uml
151 OBJECTS = \
152         activity.o \
153         actor.o \
154         association.o \
155         branch.o \
156         class.o \
157         class_dialog.o \
158         classicon.o \
159         component.o \
160         constraint.o \
161         dependency.o \
162         fork.o \
163         generalization.o \
164         implements.o \
165         large_package.o \
166         lifeline.o \
167         message.o \
168         node.o \
169         note.o \
170         object.o \
171         realizes.o \
172         small_package.o \
173         state.o \
174         state_term.o \
175         stereotype.o \
176         uml.o \
177         usecase.o
178 endif
180 DEPCFLAGS = -I. -I$(PRJ_TOP) -DHAVE_CONFIG_H $(PKG_CFLAGS)
182 #$(PACKAGE).dll : $(OBJECTS) $(PKG_DEF)
183 #       $(CC) $(CFLAGS) -LD -Fe$(PACKAGE).dll $(OBJECTS) $(PKG_LINK) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:$(PKG_DEF)
185 all : $(PACKAGE).dll
187 $(PACKAGE).dll : $(OBJECTS)
188         dllwrap --mno-cygwin --dllname $(PACKAGE).dll --implib $(PACKAGE).lib --output-exp $(PACKAGE).exp --def ../objects.def $(OBJECTS) $(PKG_LINK) -luser32 -lwsock32 -ladvapi32
190 $(PRJ_TOP)/config.h: $(PRJ_TOP)/config.h.win32
191         copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
193 endif