[hackers] [scc] Rewrite the Makefile again || Roberto E. Vargas Caballero
commit 4f96e73cfc1e0f86ffd557d377f7489999a8a31e
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jan 24 17:31:18 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jan 24 17:31:18 2016 +0100
Rewrite the Makefile again
Some of the previous rules were generating some problems
(for example once the library was built everything was
updated with it).
diff --git a/Makefile b/Makefile
index 9198024..306e6b3 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -3,29 +3,25 @@
include config.mk
-SUBDIRS = lib cc1 cc2 driver/$(DRIVER)
-ARCHS = z80 i386-sysv amd64-sysv
+DIRS = lib cc1 cc2 driver/$(DRIVER)
+ARCHS = z80 i386-sysv amd64-sysv
-all clean:
- for i in ${SUBDIRS};\
- do \
- (cd $$i; ${MAKE} -$(MAKEFLAGS) $_AT_ || exit); \
+all:
+ for i in $(DIRS) ; \
+ do \
+ (cd $$i && $(MAKE) -e -$(MAKEFLAGS)) ;\
done
+ cp -f cc1/cc1 bin/cc1
+ cp -f cc2/cc2 bin/cc2
+ cp -f driver/$(DRIVER)/scc bin/scc
-scc: lib/libcc.a
- cd driver/$(DRIVER) && make $_AT_
-
-multi: lib/libcc.a
+multi:
for i in $(ARCHS) ; \
do \
$(MAKE) -$(MAKEFLAGS) $$i || exit ;\
done
-lib/libcc.a:
- cd lib && $(MAKE) -$(MAKEFLAGS) all
-
-
-$(ARCHS): lib/libcc.a
+$(ARCHS):
for i in cc1 cc2; \
do \
(cd $$i; \
_AT_@ -35,20 +31,25 @@ $(ARCHS): lib/libcc.a
ln -f cc1/cc1 bin/cc1-$_AT_
ln -f cc2/cc2 bin/cc2-$_AT_
-install: scc
+install: all
mkdir -p $(PREFIX)/libexec/scc/
mkdir -p $(PREFIX)/bin/
- cp -f bin/cc[12]-* $(PREFIX)/libexec/scc/
- cp -f driver/$(DRIVER)/scc $(PREFIX)/bin/
- cd $(PREFIX)/libexec/scc/ && ln -f cc1-$(ARCH) cc1
- cd $(PREFIX)/libexec/scc/ && ln -f cc2-$(ARCH) cc2
- cd $(PREFIX)/libexec/scc/ && ln -f cc1 cpp
- cd $(PREFIX)/libexec/scc/ && chmod 755 cc[12]-* cc1 cc2 cpp
+ cp -f bin/cc* $(PREFIX)/libexec/scc/
+ cp -f bin/cc1 $(PREFIX)/bin/cpp
+ cp -f bin/scc $(PREFIX)/bin/
+ cd $(PREFIX)/libexec/scc/ && chmod 755 cc*
+ cd $(PREFIX)/bin && chmod 755 cpp scc
uninstall:
rm -rf $(PREFIX)/libexec/scc/
rm -f $(PREFIX)/bin/scc
+ rm -f $(PREFIX)/bin/cpp
+clean:
+ for i in ${DIRS};\
+ do \
+ (cd $$i; ${MAKE} -$(MAKEFLAGS) $_AT_ || exit); \
+ done
distclean: clean
- rm -f bin/cc[12]-*
+ rm -f bin/cc* bin/scc
Received on Sun Jan 24 2016 - 18:42:00 CET
This archive was generated by hypermail 2.3.0
: Sun Jan 24 2016 - 18:48:20 CET