2006-12-05 David Lodge <dave@cirt.net>
[dia.git] / app / makefile.mingw
blob7e453c212774f81607802e4845a4709591910fbc
1 # Makefile for mingw (with gnu make, but without bash), use :
2 # make -f makefile.mingw
4 WARNINGS =
6 TOP = ../..
7 PRJ_TOP = ..
8 PACKAGE = dia
9 include $(TOP)/glib/build/win32/make.mingw
11 LIBART = $(TOP)/libart_lgpl
13 # -DHAVE_LIBPNG 
14 PKG_CFLAGS = -DHAVE_CONFIG_H \
15         -fno-exceptions \
16         -I.. $(GLIB_CFLAGS) $(GTK2_CFLAGS) \
17         $(LIBXML2_CFLAGS) $(PNG_CFLAGS) \
18         -I$(PRJ_TOP)/lib -I$(LIBART)/.. -DHAVE_LIBART
20 PKG_LINK = $(GLIB_LIBS) $(GTK2_LIBS) $(PANGO_LIBS) \
21         $(LIBXML2_LIBS) $(PNG_LIBS) \
22         -L $(PRJ_TOP)/lib -llibdia -L $(LIBART) -llibart \
24 OBJECTS = \
25         autosave.o \
26         app_procs.o \
27         color_area.o \
28         commands.o \
29         connectionpoint_ops.o \
30         create_object.o \
31         cursor.o \
32         cut_n_paste.o \
33         defaults.o \
34         diagram.o \
35         diagram_tree.o \
36         diagram_tree_menu.o \
37         diagram_tree_menu_callbacks.o \
38         diagram_tree_window.o \
39         dialogs.o \
40         diapagelayout.o \
41         dia-props.o \
42         diaunitspinner.o \
43         disp_callbacks.o \
44         display.o \
45         dynamic_refresh.o \
46         export_png.o \
47         filedlg.o \
48         grid.o \
49         group.o \
50         gtkhwrapbox.o \
51         gtkvwrapbox.o \
52         gtkwrapbox.o \
53         handle_ops.o \
54         interface.o \
55         layer_dialog.o \
56         lineprops_area.o \
57         linewidth_area.o \
58         load_save.o \
59         magnify.o \
60         main.o \
61         menus.o \
62         modify_tool.o \
63         object_ops.o \
64         pagesetup.o \
65         paginate_gdiprint.o \
66         paginate_psprint.o \
67         plugin-manager.o \
68         preferences.o \
69         properties.o \
70         recent_files.o \
71         render_eps.o \
72         render_gdk.o \
73         render_libart.o \
74         render_pixmap.o \
75         scroll_tool.o \
76         select.o \
77         sheets.o \
78         sheets_dialog.o \
79         sheets_dialog_callbacks.o \
80         splash.o \
81         tool.o \
82         undo.o \
83         win32print.o \
84         winmain.o \
88 DEPCFLAGS = $(PKG_CFLAGS)
90 ## targets
91 all : \
92         $(PRJ_TOP)/config.h \
93         $(PACKAGE).exe
95 $(PACKAGE).res : $(PACKAGE).rc $(PACKAGE).ico
96         rc -r -fo $(PACKAGE).res $(PACKAGE).rc
98 RESOURCE = $(PACKAGE).res
100 $(PACKAGE).lib : $(OBJECTS)
101         lib /out:$(PACKAGE).lib $(OBJECTS)
103 $(PACKAGE).dll : $(OBJECTS) $(PACKAGE).def
104         $(CC) $(CFLAGS) -LD -Fe$(PACKAGE).dll $(OBJECTS) $(PKG_LINK) user32.lib advapi32.lib wsock32.lib comdlg32.lib winspool.lib $(LDFLAGS) /def:$(PACKAGE).def
106 $(PACKAGE).exe : $(OBJECTS) $(PACKAGE).def $(PACKAGE).res
107         $(CC) $(CFLAGS) -s -o $@ $(OBJECTS) $(LDFLAGS) $(PKG_LINK) -luser32 -lgdi32 -ladvapi32 -lshell32 -lwsock32 -lwinspool -lcomdlg32
108 # -mwindows 
109 # /def:$(PACKAGE).def
111 $(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
112         copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
114 clean::
115         del config.h
116         del *.exe
117         del *.o
118         del *.dll
119         del *.lib
120         del *.err
121         del *.map
122         del *.sym
123         del *.exp
124         del *.lk1
125         del *.mk1
126         del *.pdb
127         del *.ilk