summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile14
-rw-r--r--getconf/Makefile14
2 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..54200fb
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+.POSIX:
+
+all: getconf/getconf
+
+getconf/getconf:
+ cd getconf && $(MAKE)
+
+clean:
+ cd getconf && $(MAKE) clean
+
+install:
+ mkdir -p $(DESTDIR)/usr/bin
+ mkdir -p $(DESTDIR)/usr/share/man/man1
+ cd getconf && $(MAKE) install
diff --git a/getconf/Makefile b/getconf/Makefile
new file mode 100644
index 0000000..9abdd88
--- /dev/null
+++ b/getconf/Makefile
@@ -0,0 +1,14 @@
+.POSIX:
+
+CFLAGS=-D _POSIX_C_SOURCE=200809L -D _XOPEN_SOURCE=700
+
+getconf: getconf.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+clean:
+ -rm getconf
+
+install: getconf
+ cp getconf $(DESTDIR)/usr/bin/getconf
+ cp getconf.1 $(DESTDIR)/usr/share/man/man1/getconf.1
+