]> git.babelmonkeys.de Git - jubjub.git/commitdiff
Use one Makefile per directory.
authorJonathan Schleifer <js@webkeks.org>
Wed, 19 Dec 2012 22:27:14 +0000 (23:27 +0100)
committerFlorian Zeitz <florob@babelmonkeys.de>
Wed, 19 Dec 2012 22:33:03 +0000 (23:33 +0100)
Makefile
configure.ac
src/Makefile [new file with mode: 0644]
src/core/Makefile [new file with mode: 0644]
src/gui/Makefile [new file with mode: 0644]
src/gui/gtk/Makefile [new file with mode: 0644]

index 71e44510ef7783a23568309b5826c612f5beef23..dd360547e7ad00c5559ac3d662fbef4c10841b5b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,3 @@
-PROG = jubjub$(PROG_SUFFIX)
-
-SRCS = src/core/main.m \
-       src/gui/gtk/JubGtkUI.m \
-       src/gui/gtk/JubGtkRosterUI.m
+SUBDIRS = src
 
 include buildsys.mk
 
 include buildsys.mk
-
-CPPFLAGS += -Isrc/core -Isrc/gui/gtk -Isrc/gui/common
-
-LD = $(OBJC)
-LDFLAGS = -Wl,--export-dynamic
-
-CFLAGS += -Werror -faddress-sanitizer
index a14b77263cedbe582ac3000d9cc0df38ad74dc48..f8c6a007fff5ceb7a1b78d73e4c9f6ca5d242721 100644 (file)
@@ -13,11 +13,12 @@ AC_PROG_OBJC
 AC_PROG_OBJCPP
 AC_PROG_LN_S
 AC_PROG_INSTALL
 AC_PROG_OBJCPP
 AC_PROG_LN_S
 AC_PROG_INSTALL
+AC_PROG_RANLIB
 
 CPP="$OBJCPP"
 CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS $($OBJFW_CONFIG --cppflags)"
 
 CPP="$OBJCPP"
 CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS $($OBJFW_CONFIG --cppflags)"
-OBJCFLAGS="$OBJCFLAGS -Wall $($OBJFW_CONFIG --objcflags)"
-LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --ldflags)"
+OBJCFLAGS="$OBJCFLAGS -Wall $($OBJFW_CONFIG --objcflags) -Werror"
+LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --ldflags --rpath)"
 LIBS="$LIBS $($OBJFW_CONFIG --libs)"
 
 AC_CHECK_LIB(objxmpp, main, [
 LIBS="$LIBS $($OBJFW_CONFIG --libs)"
 
 AC_CHECK_LIB(objxmpp, main, [
diff --git a/src/Makefile b/src/Makefile
new file mode 100644 (file)
index 0000000..4a8896c
--- /dev/null
@@ -0,0 +1,9 @@
+SUBDIRS = core gui
+
+PROG = jubjub${PROG_SUFFIX}
+OBJS_EXTRA = core/core.a gui/gtk/gtk.a
+
+include ../buildsys.mk
+
+LD = ${OBJC}
+LDFLAGS = -Wl,--export-dynamic
diff --git a/src/core/Makefile b/src/core/Makefile
new file mode 100644 (file)
index 0000000..2bfacde
--- /dev/null
@@ -0,0 +1,6 @@
+STATIC_LIB_NOINST = core.a
+SRCS = main.m
+
+include ../../buildsys.mk
+
+CPPFLAGS += -I../gui/common -I../gui/gtk
diff --git a/src/gui/Makefile b/src/gui/Makefile
new file mode 100644 (file)
index 0000000..a658a45
--- /dev/null
@@ -0,0 +1,3 @@
+SUBDIRS = gtk
+
+include ../../buildsys.mk
diff --git a/src/gui/gtk/Makefile b/src/gui/gtk/Makefile
new file mode 100644 (file)
index 0000000..25bb2e5
--- /dev/null
@@ -0,0 +1,7 @@
+STATIC_LIB_NOINST = gtk.a
+SRCS = JubGtkUI.m      \
+       JubGtkRosterUI.m
+
+include ../../../buildsys.mk
+
+CPPFLAGS += -I../common