Compilation fix
[geanyprj.git] / makefile.win32
blob2753a3a2b48721fb8803d36bc240966b2ae15407
1 # Running make creates config.h then calls the sub makefiles.
3 # Other targets are:
4 #       deps: delete the dependencies so they are regenerated on next make
5 #       clean: clean all generated files
7 # localwin32.mk is an optional file to override make variables.
8 # Use localwin32.mk instead of editing variables as it is included in sub
9 # makefiles.
10 # localwin32.mk to set PREFIX instead of the default C:\libs
11 # For MSYS use localwin32.mk to set CP and RM.
12 # By default this will work in a Windows command prompt.
14 CC = gcc
15 CP = copy
16 RM = del
17 PREFIX = C:/libs
18 GEANY_SRC = ../geany
19 TARGET = geanyprj.dll
20 .SUFFIXES: .c .o
21 -include localwin32.mk
23 VPATH = src
25 OBJS =  geanyprj.o utils.o sidebar.o project.o xproject.o menu.o
26 INCLUDEDIRS=  -I. -I.. \
27               -I$(GEANY_SRC) \
28               -I$(GEANY_SRC)/src \
29               -I$(GEANY_SRC)/plugins \
30               -I$(GEANY_SRC)/tagmanager/include \
31               -I$(GEANY_SRC)/scintilla/include \
32               -I$(PREFIX)/include/gtk-2.0 \
33               -I$(PREFIX)/lib/gtk-2.0/include \
34               -I$(PREFIX)/include/atk-1.0 \
35               -I$(PREFIX)/include/pango-1.0 \
36               -I$(PREFIX)/include/cairo \
37               -I$(PREFIX)/include/glib-2.0 \
38               -I$(PREFIX)/lib/glib-2.0/include \
39               -I$(PREFIX)/include/gettext \
40               -I$(PREFIX)/include
41 ALL_GTK_LIBS= \
42         -L"$(PREFIX)/lib" \
43         -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 \
44         -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv
45 CCFLAGS=-Wall -O2 -mms-bitfields -DHAVE_CONFIG_H
48 all: $(TARGET)
50 deps.mak:
51         $(CC) -MM $(CCFLAGS) $(INCLUDEDIRS) src/*.c >deps.mak
53 .c.o:
54         $(CC) $(CCFLAGS) $(INCLUDEDIRS) -c $<
56 $(TARGET): $(OBJS) deps.mak
57         $(CC) -shared $(OBJS) $(ALL_GTK_LIBS) -o $(TARGET)
59 clean:
60         -$(RM) deps.mak *.o *.dll
62 # Generate header dependencies with "make deps.mak"
63 include deps.mak