Make all callbacks 'nothrow'. This makes everything else 'nothrow' too.
[girtod.git] / Makefile
blob9d47c08b220df2f650b7d63f31eba6fcce26f1ff
2 #FIXME: only GDC support right now.
4 #GDCARCH=-m32 -march=i686 -mtune=corei7
5 DC=gdc ${GDCARCH}
7 #DC+=-ffunction-sections -fdata-sections -Wl,--gc-sections
9 # NOTE: -flto is needed for GDC to not emit function wrappers
10 # (which do nothing: "push %ebp; mov %esp,%ebp; pop %ebp; jmp <target>")
11 # To avoid these the binding modules need to be compiled w/ -flto too.
12 #DC+=-flto
14 DC+=-Wl,--export-dynamic # slows down linking, needed only for backtraces
16 DC+=-Wl,--as-needed
18 DLANGFLAGS+=-fproperty
19 DLANGFLAGS+=-fdeprecated # necessary because of octal literals in std lib...
20 DWARNFLAGS+=-Wall
21 DDEBUGFLAGS+=-g -fdebug-c
22 #DRELFLAGS=-frelease -fno-bounds-check
23 DFLAGS=-O3 ${DLANGFLAGS} ${DWARNFLAGS} ${DDEBUGFLAGS} ${DRELFLAGS}
25 dsources = $(wildcard *.d)
26 dtargets = $(patsubst %.d,%,${dsources})
28 intermediates = $(wildcard *.o) $(wildcard */*.o)
30 LIBS_GTK = ${shell pkg-config --libs gtk+-2.0}
32 testimports: gtk2/glib2.o
33 testimports: TLIBS = ${LIBS_GTK}
34 example_glib: gtk2/glib2.o
35 example_glib: TLIBS = ${LIBS_GTK}
36 example_gtk1: gtk2/glib2.o gtk2/gobject2.o gtk2/gtk2.o
37 example_gtk1: TLIBS = ${LIBS_GTK}
38 example_gtk2: gtk2/glib2.o gtk2/gobject2.o gtk2/gdk2.o gtk2/gtk2.o
39 example_gtk2: TLIBS = ${LIBS_GTK}
40 example_gtk3: gtk2/glib2.o gtk2/gobject2.o gtk2/gdk2.o gtk2/gtk2.o
41 example_gtk3: TLIBS = ${LIBS_GTK}
43 LIBS_CLUTTER = ${shell pkg-config --libs clutter-1.0}
45 example_clutter1: gtk2/glib2.o gtk2/gobject2.o gtk2/clutter.o
46 example_clutter1: TLIBS = ${LIBS_CLUTTER}
47 example_clutter2: gtk2/glib2.o gtk2/gobject2.o gtk2/clutter.o
48 example_clutter2: TLIBS = ${LIBS_CLUTTER}
50 LIBS_MX2 = ${shell pkg-config --libs mx-2.0}
52 example_mx3: gtk2/mx2.o gtk2/glib2.o #gtk2/gobject2.o gtk2/clutter.o
53 example_mx3: TLIBS = ${LIBS_MX2}
55 # WIP, static linking not tested yet:
56 static_exe: gtk2/glib2.o gtk2/gmodule2.o gtk2/gobject2.o gtk2/gdk2.o gtk2/gtk2.o
57 static_exe: TDFLAGS = -static -fno-lto
58 static_exe: TLIBS = ${shell pkg-config --static --libs gtk+-2.0} ${shell pkg-config --static --libs gmodule-2.0} ${shell pkg-config --static --libs gdk-pixbuf-2.0}
59 static_exe: example_gtk3.d
60 ${DC} ${DFLAGS} ${TDFLAGS} $^ ${TLIBS} -o $@
62 TARGETS= ${dtargets}
64 all: ${TARGETS}
66 clean:
67 rm -f core ${TARGETS}
68 rm -f ${intermediates}
70 .SECONDEXPANSION:
71 %:%.d $${ODEPS}
72 ${DC} ${DFLAGS} ${TDFLAGS} $^ ${TLIBS} -o $@
74 .SECONDARY:
75 %.o:%.d
76 ${DC} ${DFLAGS} ${TDFLAGS} $^ -c -o $@