Help save net neutrality! Learn more.
Close

[bfa2db]: / src / makefile.win32  Maximize  Restore  History

Download this file

102 lines (82 with data), 2.8 kB

# Note: PACKAGE_DATA_DIR and PACKAGE_LOCALE_DIR are no longer used on Windows.

DEFINES = -DHAVE_CONFIG_H \
	-DGEANY_PRIVATE \
	-DGEANY_DATADIR=\"data\" \
	-DGEANY_LOCALEDIR=\"\" \
	-DGEANY_LIBDIR=\"\" \
	-DGEANY_PREFIX=\"\" \
	-DGTK

.SUFFIXES: .c .o .h .a
WINDRES = windres.exe
CC = gcc
CXX = g++
RES  = ../geany_private.res
TARGET = ../geany.exe
EXECDIR = c:\distrib
PREFIX = C:\libs
RM = del
-include ../localwin32.mk

GTK_INCLUDES= \
	-I$(PREFIX)/include/gtk-2.0 \
	-I$(PREFIX)/lib/gtk-2.0/include \
	-I$(PREFIX)/include/atk-1.0 \
	-I$(PREFIX)/include/cairo \
	-I$(PREFIX)/include/gdk-pixbuf-2.0 \
	-I$(PREFIX)/include/pango-1.0 \
	-I$(PREFIX)/include/glib-2.0 \
	-I$(PREFIX)/lib/glib-2.0/include \
	-I$(PREFIX)/include \
	-I$(PREFIX)/include/gettext

INCLUDEDIRS=  -I.. \
              -I../scintilla/include \
              -I../tagmanager/mio \
              -I../tagmanager/src \
              $(GTK_INCLUDES)

ALL_GTK_LIBS= \
	-L"$(PREFIX)/lib" \
	-lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 \
	-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lgthread-2.0 -lintl \
	-lcairo -lpangocairo-1.0 -lgio-2.0
	# these things are for GTK >= 2.8
	# (should be same as with MSYS: pkg-config --libs gtk+-2.0 gthread-2.0)
	#"$(PREFIX)/lib/libcairo.dll.a" \
	#"$(PREFIX)/lib/asprintf.lib" \
	#"$(PREFIX)/lib/charset.lib" \

WIN_LIBS=-mwindows -lole32 -luuid -liberty -lwsock32

CBASEFLAGS=-Wall -pipe -mms-bitfields $(DEFINES) $(INCLUDEDIRS)
ifdef DEBUG
CFLAGS=-O0 -g $(CBASEFLAGS)
DEFINES += -DGEANY_DEBUG
else
CFLAGS=-O2 $(CBASEFLAGS)
endif

OBJS =	about.o build.o callbacks.o dialogs.o document.o editor.o encodings.o filetypes.o \
		geanyentryaction.o geanymenubuttonaction.o geanyobject.o geanywraplabel.o highlighting.o \
		keybindings.o keyfile.o log.o main.o msgwindow.o navqueue.o notebook.o \
		plugins.o pluginutils.o prefs.o printing.o project.o sciwrappers.o search.o \
		socket.o stash.o symbols.o templates.o toolbar.o tools.o sidebar.o \
		ui_utils.o utils.o win32.o

.c.o:
	$(CC) $(CFLAGS) -c $<

# all: binclean $(TARGET) #exec
all: $(TARGET)

$(RES): ../geany_private.rc ../icons/geany.ico
	$(WINDRES) -i $< --input-format=rc -o $@ -O coff

# this calls parent clean-local target because del ../file won't work
clean:
	-$(RM) deps.mak *.o
	$(MAKE) -C .. -f makefile.win32 clean-local

exec:
	$(EXECDIR)\geany.exe

binclean:
	$(RM) $(TARGET)

STLIBS = ../scintilla/scintilla.a ../tagmanager/ctags/ctags.a \
	../tagmanager/mio/mio.a ../tagmanager/src/tagmanager.a

$(TARGET): $(OBJS) $(RES) $(STLIBS)
	$(CXX) $(OBJS) $(RES) -o $(TARGET) $(STLIBS) $(ALL_GTK_LIBS) $(WIN_LIBS)

deps.mak:
	$(CC) -MM  $(CFLAGS) *.c >deps.mak

# Generate header dependencies with "make deps.mak"
include deps.mak

..\localwin32.mk:
	echo # Set local variables here >$@