r5118 | eht16 | 2010-08-05 22:54:18 +0100 (Thu, 05 Aug 2010) | 1 line
[geany-mirror.git] / src / makefile.win32
blob20b634506ea5aa86bb6e5ed77c029a6655156cfe
1 # Note: PACKAGE_DATA_DIR and PACKAGE_LOCALE_DIR are no longer used on Windows.
3 DEFINES = -DHAVE_CONFIG_H \
4         -DGEANY_PRIVATE \
5         -DGEANY_DATADIR=\"data\" \
6         -DGEANY_LOCALEDIR=\"\" \
7         -DGEANY_LIBDIR=\"\" \
8         -DGEANY_PREFIX=\"\" \
9         -DGTK
11 .SUFFIXES: .c .o .h .a
12 WINDRES = windres.exe
13 CC = gcc
14 CXX = g++
15 RES  = ../geany_private.res
16 TARGET = ../geany.exe
17 EXECDIR = c:\distrib
18 PREFIX = C:\libs
19 RM = del
20 -include ../localwin32.mk
22 GTK_INCLUDES= \
23         -I$(PREFIX)/include/gtk-2.0 \
24         -I$(PREFIX)/lib/gtk-2.0/include \
25         -I$(PREFIX)/include/atk-1.0 \
26         -I$(PREFIX)/include/pango-1.0 \
27         -I$(PREFIX)/include/cairo \
28         -I$(PREFIX)/include/glib-2.0 \
29         -I$(PREFIX)/lib/glib-2.0/include \
30         -I$(PREFIX)/include/gettext \
31         -I$(PREFIX)/include
33 INCLUDEDIRS=  -I.. \
34               -I../scintilla/include \
35               -I../tagmanager/include \
36               $(GTK_INCLUDES)
38 ALL_GTK_LIBS= \
39         -L"$(PREFIX)/lib" \
40         -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 \
41         -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl
42         # these things are for GTK >= 2.8
43         # (should be same as with MSYS: pkg-config --libs gtk+-2.0 gthread-2.0)
44         #"$(PREFIX)/lib/libcairo.dll.a" \
45         #"$(PREFIX)/lib/asprintf.lib" \
46         #"$(PREFIX)/lib/charset.lib" \
48 ifdef GTK280
49 ALL_GTK_LIBS +=-liconv
50 else
51 ALL_GTK_LIBS +=-lcairo -lpangocairo-1.0 -lgio-2.0
52 endif
54 WIN_LIBS=-mwindows -lole32 -luuid -liberty -lwsock32
56 CBASEFLAGS=-Wall -pipe -mms-bitfields $(DEFINES) $(INCLUDEDIRS)
57 ifdef DEBUG
58 CFLAGS=-O0 -g $(CBASEFLAGS)
59 DEFINES += -DGEANY_DEBUG
60 else
61 CFLAGS=-O2 $(CBASEFLAGS)
62 endif
64 OBJS =  about.o build.o callbacks.o dialogs.o document.o editor.o encodings.o filetypes.o \
65                 geanyentryaction.o geanymenubuttonaction.o geanyobject.o geanywraplabel.o highlighting.o \
66                 interface.o keybindings.o keyfile.o \
67                 log.o main.o msgwindow.o navqueue.o notebook.o plugins.o pluginutils.o \
68                 prefs.o printing.o project.o \
69                 sciwrappers.o search.o socket.o stash.o \
70                 symbols.o templates.o toolbar.o tools.o sidebar.o \
71                 ui_utils.o utils.o win32.o
73 .c.o:
74         $(CC) $(CFLAGS) -c $<
76 # all: binclean $(TARGET) #exec
77 all: $(TARGET)
79 $(RES): ../geany_private.rc ../icons/geany.ico
80         $(WINDRES) -i $< --input-format=rc -o $@ -O coff
82 # this calls parent clean-local target because del ../file won't work
83 clean:
84         -$(RM) deps.mak *.o
85         cd .. && $(MAKE) -f makefile.win32 clean-local && cd src
87 exec:
88         $(EXECDIR)\geany.exe
90 binclean:
91         $(RM) $(TARGET)
93 $(TARGET): $(OBJS) $(RES) ../scintilla/scintilla.a ../tagmanager/tagmanager.a
94         $(CXX) $(OBJS) $(RES) -o $(TARGET) \
95         ../scintilla/scintilla.a ../tagmanager/tagmanager.a $(ALL_GTK_LIBS) \
96          $(WIN_LIBS)
98 deps.mak:
99         $(CC) -MM  $(CFLAGS) *.c >deps.mak
101 # Generate header dependencies with "make deps.mak"
102 include deps.mak
104 ..\localwin32.mk:
105         echo # Set local variables here >$@