summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2008-04-17 14:09:13 +0000
committerTimo Teras <timo.teras@iki.fi>2008-04-17 14:09:13 +0000
commitd6c74352427367a334d37469962bbcf1b9ae364c (patch)
tree81ebcf6fc8abf08baea3f0015bc2f7a08768fb1f /Makefile
parent45d2c702fc8a47bc3f5ab4698de2bf1e377301c4 (diff)
downloadapk-tools-d6c74352427367a334d37469962bbcf1b9ae364c.tar.gz
apk-tools-d6c74352427367a334d37469962bbcf1b9ae364c.tar.bz2
apk-tools-d6c74352427367a334d37469962bbcf1b9ae364c.tar.xz
apk-tools-d6c74352427367a334d37469962bbcf1b9ae364c.zip
Initial commit of some stuff written so far. Still in state of flux. Expect
breakage and major changes.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile52
1 files changed, 52 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..563f066
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,52 @@
+# Makefile - one file to rule them all, one file to bind them
+#
+# Copyright (C) 2007 Timo Teräs <timo.teras@iki.fi>
+# All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 3 as published
+# by the Free Software Foundation. See http://www.gnu.org/ for details.
+
+VERSION := 2.0-pre0
+
+SVN_REV := $(shell svn info 2> /dev/null | grep ^Revision | cut -d ' ' -f 2)
+ifneq ($(SVN_REV),)
+FULL_VERSION := $(VERSION)-r$(SVN_REV)
+else
+FULL_VERSION := $(VERSION)
+endif
+
+CC=gcc
+INSTALL=install
+INSTALLDIR=$(INSTALL) -d
+
+CFLAGS=-O2 -g -D_GNU_SOURCE -Werror -Wall -Wstrict-prototypes -std=gnu99 \
+ -DAPK_VERSION=\"$(FULL_VERSION)\"
+LDFLAGS=-g -lpthread
+
+DESTDIR=
+SBINDIR=/usr/sbin
+CONFDIR=/etc/apk
+MANDIR=/usr/share/man
+DOCDIR=/usr/share/doc/apk
+
+SUBDIRS=src
+
+.PHONY: compile install clean all
+
+all: compile
+
+compile install clean::
+ @for i in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$i $(MAKECMDGOALS); done
+
+install::
+ $(INSTALLDIR) $(DESTDIR)$(DOCDIR)
+ $(INSTALL) README $(DESTDIR)$(DOCDIR)
+
+dist:
+ svn-clean
+ (TOP=`pwd` && cd .. && ln -s $$TOP apk-tools-$(VERSION) && \
+ tar --exclude '*/.svn*' -cjvf apk-tools-$(VERSION).tar.bz2 apk-tools-$(VERSION)/* && \
+ rm apk-tools-$(VERSION))
+
+.EXPORT_ALL_VARIABLES: