Added a simple configure script that is superior to gnu autotools
authorArt Cancro <ajc@citadel.org>
Fri, 19 Aug 2016 22:15:19 +0000 (18:15 -0400)
committerArt Cancro <ajc@citadel.org>
Fri, 19 Aug 2016 22:15:19 +0000 (18:15 -0400)
ctdlsh/Makefile
ctdlsh/configure [new file with mode: 0755]

index a7d0deb..f994022 100644 (file)
@@ -1,10 +1,9 @@
-OBJS := datetime.o export.o main.o passwd.o shutdown.o sockets.o who.o config.o
+include config.mk
 
-CFLAGS := -ggdb
-LDFLAGS :=
+OBJS := datetime.o export.o main.o passwd.o shutdown.o sockets.o who.o config.o
 
 # link
-ctdlsh: $(OBJS)
+ctdlsh: $(OBJS) config.mk
        gcc $(OBJS) $(LDFLAGS) -lreadline -o ctdlsh
 
 # pull in dependency info for *existing* .o files
@@ -15,11 +14,14 @@ ctdlsh: $(OBJS)
        gcc -c $(CFLAGS) $*.c -o $*.o
        gcc -MM $(CFLAGS) $*.c > $*.d
 
-# remove compilation products
+config.mk:
+       ./configure
+
 clean:
        rm -f ctdlsh *.o *.d
 
 distclean: clean
+       rm -f config.mk
 
 install: ctdlsh
        echo Not yet
diff --git a/ctdlsh/configure b/ctdlsh/configure
new file mode 100755 (executable)
index 0000000..53ee6cf
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+echo 
+echo 
+echo Running the configure script to create config.mk
+echo
+
+(
+       echo 'CFLAGS := -ggdb'
+       echo 'LDFLAGS :='
+) >config.mk
+