]> git.draconx.ca Git - upkg.git/blobdiff - src/Makefile.am
build: Integrate Gnulib non-recursively using fix-gnulib.
[upkg.git] / src / Makefile.am
index 80cbd2267837730f29204db89261e6796034400b..5a0b6826769b33fb7e45e0241918b0bae3e6d507 100644 (file)
@@ -1,17 +1,53 @@
+# Copyright © 2009-2011 Nick Bowler
+#
+# License WTFPL2: Do What The Fuck You Want To Public License, version 2.
+# This is free software: you are free to do what the fuck you want to.
+# There is NO WARRANTY, to the extent permitted by law.
+
+AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
+AM_LDFLAGS  = -L$(top_builddir)/lib
+
+EXTRA_DIST =
+MAINTAINERCLEANFILES =
+
 lib_LTLIBRARIES = libupkg.la
+pkglib_LTLIBRARIES =
 
-libupkg_la_SOURCES = libupkg.c pack.c
 include_HEADERS = upkg.h
-noinst_HEADERS = pack.h exportable.h uobject.h module.h avl.h
+noinst_HEADERS  = pack.h
 
-if BUILD_UPKG
+# This trick should define orderonly to | iff we're using GNU make.
+have_orderonly = $(findstring order-only,$(.FEATURES))
+orderonly = $(have_orderonly:order-only=|)
 
+include uobject/Makefile.inc
 include engine/Makefile.inc
 
+libupkg_la_SOURCES = libupkg.c pack.c
+
 bin_PROGRAMS  = upkg
-upkg_SOURCES  = upkg.c avl.c module.c exportable.c uobject.c
-upkg_CPPFLAGS = $(GLIB_CFLAGS) $(LTDLINCL)
-upkg_LDFLAGS  = -export-dynamic
-upkg_LDADD    = libupkg.la $(LIBLTDL) $(GLIB_LIBS)
+upkg_SOURCES  = upkg.c
+upkg_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
+upkg_LDFLAGS  = $(AM_LDFLAGS) -export-dynamic
+upkg_LDADD    = libuobject.la libupkg.la $(GLIB_LIBS) $(top_builddir)/libgnu.la
+
+GOB_V   = $(GOB_V_$(V))
+GOB_V_  = $(GOB_V_$(AM_DEFAULT_VERBOSITY))
+GOB_V_0 = @echo "  GOB   " $<;
+
+.gob.gobstamp:
+       $(AM_V_at) touch $@.tmp
+       $(GOB_V) $(GOB2) --file-sep=/ --no-private-header $<
+       $(AM_V_at) mv -f $@.tmp $@
+
+.gobstamp.c:
+       @if test -f $@; then :; else \
+               rm -f $<; \
+               $(MAKE) $(AM_MAKEFLAGS) $<; \
+       fi
 
-endif
+.gobstamp.h:
+       @if test -f $@; then :; else \
+               rm -f $<; \
+               $(MAKE) $(AM_MAKEFLAGS) $<; \
+       fi