scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

main.mk (1324B)


      1 .POSIX:
      2 
      3 DIRS  =\
      4 	doc\
      5 	src\
      6 	src/libc\
      7 	src/libcrt\
      8 	include/scc/bits/scc\
      9 	tests\
     10 
     11 PROJECTDIR = .
     12 include scripts/rules.mk
     13 
     14 ROOT = $(DESTDIR)$(PREFIX)
     15 NODEP = 1
     16 
     17 DIST_FILES =\
     18 	doc\
     19 	include\
     20 	LICENSE\
     21 	main.mk\
     22 	Makefile\
     23 	README\
     24 	scripts\
     25 	src\
     26 	tests\
     27 
     28 all:
     29 	+@$(MAKE) -f main.mk doc
     30 	+@$(MAKE) -f main.mk toolchain
     31 	+@$(MAKE) -f main.mk $(ARCH)
     32 
     33 config: FORCE
     34 	+@cd include/scc/bits/scc && $(MAKE)
     35 
     36 install: all
     37 	$(SCRIPTDIR)/install $(ROOT)
     38 	+@$(MAKE) -f main.mk install-$(ARCH)
     39 
     40 uninstall:
     41 	$(SCRIPTDIR)/uninstall $(ROOT)
     42 	+@$(MAKE) -f main.mk uninstall-$(ARCH)
     43 
     44 toolchain: src
     45 libc: src/libc
     46 libcrt: src/libcrt
     47 
     48 $(DIRS): dirs
     49 
     50 dirs: $(SCRIPTDIR)/dirs
     51 	xargs mkdir -p < $(SCRIPTDIR)/dirs
     52 	touch dirs
     53 
     54 clean: FORCE
     55 	xargs rm -rf < $(SCRIPTDIR)/dirs
     56 	find . -name '*.gcno' -o -name '*.gcda' | xargs rm -f
     57 	rm -rf dirs coverage
     58 
     59 distclean: clean
     60 	rm config.mk
     61 	rm -f include/scc/bits/scc/cstd.h
     62 	rm -f include/scc/bits/scc/sys.h
     63 	rm -f include/scc/bits/scc/config.h
     64 	rm -rf scc-$(VERSION)
     65 	rm -f *.gz *.asc
     66 
     67 dist: distclean
     68 	mkdir scc-$(VERSION)
     69 	cp -R $(DIST_FILES) scc-$(VERSION)/
     70 	tar -cf - scc-$(VERSION) | gzip > scc-$(VERSION).tar.gz
     71 	rm -rf scc-$(VERSION)
     72 	gpg -b -a scc-$(VERSION).tar.gz
     73 
     74 include scripts/amd64.mk
     75 include scripts/arm.mk
     76 include scripts/arm64.mk
     77 include scripts/i386.mk
     78 include scripts/ppc.mk