From 3a233a0664461f57f4aef6ca9ca98e15a77a081c Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Wed, 19 Dec 2012 23:27:14 +0100 Subject: [PATCH 1/1] Use one Makefile per directory. --- Makefile | 13 +------------ configure.ac | 5 +++-- src/Makefile | 9 +++++++++ src/core/Makefile | 6 ++++++ src/gui/Makefile | 3 +++ src/gui/gtk/Makefile | 7 +++++++ 6 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 src/Makefile create mode 100644 src/core/Makefile create mode 100644 src/gui/Makefile create mode 100644 src/gui/gtk/Makefile 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 -- 2.39.5