summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2005-09-03 16:10:27 +0000
committerBenedikt Boehm <hollow@gentoo.org>2005-09-03 16:10:27 +0000
commit15d9155808de928fa26bfeaaecfee7210afde0d3 (patch)
treef113365bda736d949d39dd94bd99346056030e30 /src/Makefile
downloadbaselayout-vserver-15d9155808de928fa26bfeaaecfee7210afde0d3.tar.gz
baselayout-vserver-15d9155808de928fa26bfeaaecfee7210afde0d3.tar.bz2
baselayout-vserver-15d9155808de928fa26bfeaaecfee7210afde0d3.zip
import initial baselayout sources (1.12.0_pre8)
svn path=/baselayout-vserver/trunk/; revision=3
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..252dea0
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,49 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+CC = gcc
+LD = gcc
+
+CFLAGS = -Wall -O2
+DESTDIR =
+LIBDIR = lib
+
+BIN_TARGETS =
+SBIN_TARGETS = consoletype runscript start-stop-daemon
+SYS_WHITELIST = env_whitelist
+
+TARGET = $(BIN_TARGETS) $(SBIN_TARGETS)
+
+OS = Linux
+ifeq ($(OS),Linux)
+LDFLAGS_RS = -ldl
+endif
+ifeq ($(OS),BSD)
+LDFLAGS_SSD = -lkvm
+endif
+
+override CFLAGS += -DLIBDIR=\"$(LIBDIR)\"
+
+all: $(TARGET)
+
+rs-misc.o: core/misc.c
+ $(CC) $(CFLAGS) -c -o $@ $^
+
+runscript: runscript.o rs-misc.o
+ $(LD) $(LDFLAGS) -o $@ $^ $(LDFLAGS_RS)
+
+start-stop-daemon: start-stop-daemon.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDFLAGS_SSD)
+
+install: $(TARGET)
+ install -m 0755 -d $(DESTDIR)/bin
+ install -m 0755 -d $(DESTDIR)/sbin
+# install -m 0755 $(BIN_TARGETS) $(DESTDIR)/bin
+ install -m 0755 $(SBIN_TARGETS) $(DESTDIR)/sbin
+ install -m 0755 -d $(DESTDIR)/$(LIBDIR)/rcscripts/conf.d
+ install -m 0644 $(SYS_WHITELIST) $(DESTDIR)/$(LIBDIR)/rcscripts/conf.d
+
+clean:
+ rm -f $(TARGET)
+ rm -f *.o *~