From: Jonathan Schleifer Date: Wed, 19 Dec 2012 22:27:14 +0000 (+0100) Subject: Use one Makefile per directory. X-Git-Url: https://git.babelmonkeys.de/?a=commitdiff_plain;h=3a233a0664461f57f4aef6ca9ca98e15a77a081c;p=jubjub.git Use one Makefile per directory. --- diff --git a/Makefile b/Makefile index 71e4451..dd36054 100644 --- 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 - -CPPFLAGS += -Isrc/core -Isrc/gui/gtk -Isrc/gui/common - -LD = $(OBJC) -LDFLAGS = -Wl,--export-dynamic - -CFLAGS += -Werror -faddress-sanitizer diff --git a/configure.ac b/configure.ac index a14b772..f8c6a00 100644 --- a/configure.ac +++ b/configure.ac @@ -13,11 +13,12 @@ AC_PROG_OBJC AC_PROG_OBJCPP AC_PROG_LN_S AC_PROG_INSTALL +AC_PROG_RANLIB 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, [ diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..4a8896c --- /dev/null +++ b/src/Makefile @@ -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 index 0000000..2bfacde --- /dev/null +++ b/src/core/Makefile @@ -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 index 0000000..a658a45 --- /dev/null +++ b/src/gui/Makefile @@ -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 index 0000000..25bb2e5 --- /dev/null +++ b/src/gui/gtk/Makefile @@ -0,0 +1,7 @@ +STATIC_LIB_NOINST = gtk.a +SRCS = JubGtkUI.m \ + JubGtkRosterUI.m + +include ../../../buildsys.mk + +CPPFLAGS += -I../common