]> Pileus Git - grits/blobdiff - src/Makefile.am
Update windowing system tests
[grits] / src / Makefile.am
index c4ad298912715d44ce30463c2593e6b4e34f6eec..fd2fceb520e65316b3680c6a058bf924ce411a42 100644 (file)
@@ -3,10 +3,18 @@ SUBDIRS = data objects . plugins
 AM_CFLAGS   = -Wall --std=gnu99 -I$(top_srcdir)/src
 AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(GL_CFLAGS) $(SOUP_CFLAGS)
 AM_LDADD    = $(GLIB_LIBS) $(GTK_LIBS) $(GL_LIBS) $(SOUP_LIBS)
-AM_LDFLAGS  = -Wl,--as-needed -Wl,--no-undefined
-
-BUILT_SOURCES = grits-marshal.c grits-marshal.h
+AM_LDFLAGS  = 
 
+# System dependant flags
+if SYS_WIN
+AM_LDFLAGS += -mwindows -no-undefined
+endif
+if SYS_MAC
+AM_CFLAGS  += -ObjC
+AM_LDFLAGS += -framework AppKit
+else
+AM_LDFLAGS += -Wl,--as-needed -Wl,--no-undefined
+endif
 
 # Headers
 grits_includedir = $(includedir)/grits
@@ -17,6 +25,7 @@ grits_include_HEADERS = \
        grits-opengl.h  \
        grits-plugin.h  \
        grits-util.h    \
+       gtkgl.h         \
        gpqueue.h       \
        roam.h
 
@@ -47,14 +56,6 @@ libgrits_la_LDFLAGS = $(AM_LDFLAGS) \
        -version-info $(LIB_VERSION)
 
 # Demo program
-if WIN32
-AM_CPPFLAGS += -DUSE_WGL
-AM_LDFLAGS  += -mwindows
-dots         = ..
-else
-AM_CPPFLAGS += -DUSE_GLX
-endif
-
 bin_PROGRAMS = grits-demo
 
 grits_demo_SOURCES = grits-demo.c
@@ -69,14 +70,18 @@ grits_test_LDADD   = $(AM_LDADD) libgrits.la
 tile_test_SOURCES = tile-test.c
 tile_test_LDADD   = $(AM_LDADD) libgrits.la
 
-
+# Clean
 MAINTAINERCLEANFILES = Makefile.in
 
+# Generated code 
+BUILT_SOURCES = grits-marshal.c grits-marshal.h
+
 .list.c:
        glib-genmarshal --prefix=grits_cclosure_marshal --body   $< > $@
 .list.h:
        glib-genmarshal --prefix=grits_cclosure_marshal --header $< > $@
 
+# Debugging rules
 test: all .libs/$(GRITS_SUBDIR)
        ./grits-test
 
@@ -98,5 +103,5 @@ memcheck: all
                 --num-callers=50               \
                 --suppressions=gtk.suppression \
                 --suppressions=/usr/lib/valgrind/default.supp \
-                ./grits-test                   \
+                .libs/grits-test               \
        2> valgrind.out