[hackers] [scc] Update to suckless Makefile style || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sun, 19 Jul 2015 19:34:12 +0200 (CEST)

commit 235b5368a2c5ad4d58fb02dc9efa0a8d59fb3830
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jul 19 19:32:50 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jul 19 19:32:50 2015 +0200

    Update to suckless Makefile style

diff --git a/Makefile b/Makefile
index cfdf573..0e055e9 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -1,10 +1,20 @@
+# scc - Sucless C Compiler
 
-DIRS = lib cc1 cc2
+include config.mk
+
+SUBDIRS = \
+ lib \
+ cc1 \
+ cc2
 
 all clean:
- for i in $(DIRS) ;\
+ _AT_echo scc build options:
+ _AT_echo "CFLAGS = ${CFLAGS}"
+ _AT_echo "LDFLAGS = ${LDFLAGS}"
+ _AT_echo "CC = ${CC}"
+ _AT_for i in ${SUBDIRS};\
         do \
- (cd $$i && $(MAKE) $_AT_) ;\
- done
+ (cd $$i; ${MAKE} $(MAKEFLAGS) $_AT_ || exit); \
+ done;
 
 .POSIX:
diff --git a/config.mk b/config.mk
new file mode 100644
index 0000000..2d77561
--- /dev/null
+++ b/config.mk
_AT_@ -0,0 +1,15 @@
+# Customize to fit your system
+
+# paths
+PREFIX = /usr/local/
+MANPREFIX = ${PREFIX}/share/man
+
+VERSION = 0.1
+
+# Flags
+#CFLAGS = -std=c99
+#LDFLAGS =
+
+# Tools
+#CC = cc
+#AR =
Received on Sun Jul 19 2015 - 19:34:12 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 19 2015 - 19:36:10 CEST