don't treat caps as an element
[opo.git] / Makefile
blob5fc63bbc495abd5e14e08c98aba84bc4e36d9c32
1 all:: gtk-app
3 GDB_ALWAYS_FLAGS = -g
4 WARNINGS = -Wall -Wextra -Wno-unused-parameter
6 ARCH = $(shell arch)
7 ifeq "$(ARCH)" "x86_64"
8 ARCH_CFLAGS = -fPIC -DPIC -m64
9 else
10 ARCH_CFLAGS = -m32 -msse2
11 endif
13 ALL_CFLAGS = -march=native -pthread $(VECTOR_FLAGS) -O3 $(WARNINGS) -pipe -D_GNU_SOURCE -std=gnu99 $(INCLUDES) $(ARCH_CFLAGS) $(CFLAGS) $(GDB_ALWAYS_FLAGS)
14 ALL_LDFLAGS = $(LDFLAGS)
16 VECTOR_FLAGS = -msse2 -DHAVE_SSE2 -D__SSE2__ -floop-strip-mine -floop-block
18 # these *might* do something useful
19 # -fvisibility=hidden
20 #POSSIBLE_OPTIMISING_CFLAGS = -fmodulo-sched -fmodulo-sched-allow-regmoves -fgcse-sm -fgcse-las \
21 # -funsafe-loop-optimizations -Wunsafe-loop-optimizations -fsee -funsafe-math-optimizations and more
22 # "-combine -fwhole-program" with __attribute__((externally_visible))
23 # -fprofile-arcs and -fbranch-probabilities
24 #POSSIBLE_PESSIMISING_CFLAGS -fmudflap -fmudflapth -fmudflapir
26 CC = gcc
27 AR = ar
28 INSTALL = install
30 GST_INCLUDES = -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2
31 INCLUDES = -I. $(GST_INCLUDES)
33 LINKS = -L/usr/local/lib -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 \
34 -lglib-2.0 -lgstvideo-0.10
36 SOURCES =
37 OBJECTS := $(patsubst %.c,%.o,$(SOURCES))
39 clean:
40 rm -f *.so *.o *.a *.d *.s
42 .c.o:
43 # @echo $(CPATH)
44 # @echo $(LIBRARY_PATH)
45 $(CC) -c -MD $(ALL_CFLAGS) $(CPPFLAGS) -o $@ $<
46 # $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) -MD $<
48 %.s: %.c
49 $(CC) -S $(ALL_CFLAGS) $(CPPFLAGS) -o $@ $<
51 %.i: %.c
52 $(CC) -E $(ALL_CFLAGS) $(CPPFLAGS) -o $@ $<
55 test-gtk: debug gtk-app
56 GST_DEBUG=sparrow:$(DEBUG_LEVEL) gdb ./gtk-app
59 .PHONY: TAGS all rsync app-clean clean
61 GTK_APP = gtk-app.c
62 GTK_LINKS = -lglib-2.0 $(LINKS) -lgstinterfaces-0.10 -lgtk-x11-2.0
63 GTK_INCLUDES = -I/usr/include/gtk-2.0/ -I/usr/include/cairo/ -I/usr/include/pango-1.0/ -I/usr/lib/gtk-2.0/include/ -I/usr/include/atk-1.0/ -I/usr/include/gdk-pixbuf-2.0/
65 gtk-app::
66 $(CC) -g $(ALL_CFLAGS) $(CPPFLAGS) $(CV_LINKS) $(INCLUDES) $(GTK_INCLUDES)\
67 $(GTK_LINKS) -o $@ $(GTK_APP)
69 debug:
70 make -B CFLAGS='-g -fno-inline -fno-inline-functions -fno-omit-frame-pointer -O0' gtk-app