-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
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, [
--- /dev/null
+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
--- /dev/null
+STATIC_LIB_NOINST = core.a
+SRCS = main.m
+
+include ../../buildsys.mk
+
+CPPFLAGS += -I../gui/common -I../gui/gtk
--- /dev/null
+SUBDIRS = gtk
+
+include ../../buildsys.mk
--- /dev/null
+STATIC_LIB_NOINST = gtk.a
+SRCS = JubGtkUI.m \
+ JubGtkRosterUI.m
+
+include ../../../buildsys.mk
+
+CPPFLAGS += -I../common