Improve & cleanup makefile

parent 224059d8
Pipeline #15351 failed with stage
in 7 minutes and 11 seconds
SHELL=/bin/bash
BIN:=CloogleServer builddb
BIN:=builddb CloogleServer
DB=types.json
MAN:=builddb.1 # Others don't have --help/--version # $(addsuffix .1,$(BIN))
CLM:=clm
CLMFLAGS:=-h 250M -nr -nortsopts\
-IL TCPIP\
......@@ -14,22 +12,18 @@ ifeq "$(shell expr `gcc -dumpversion | cut -f1 -d.` \>= 6)" "1"
CLMFLAGS+=-l -no-pie
endif
.PHONY: all clean distclean
.PHONY: all clean distclean .FORCE
all: $(BIN) $(DB)
man: $(MAN)
%.1: %
help2man -N ./$< > $@
CloogleServer:
CloogleServer: .FORCE
$(CLM) $(CLMFLAGS) $@ -o $@
shopt -s globstar
touch **/*.[di]cl
find -name '*.[di]cl' -not -path './Cloogle/clean-compiler/*' -exec touch {} \;
$(CLM) $(CLMFLAGS) $@ -o $@
builddb: Cloogle/clean-compiler
builddb: Cloogle/clean-compiler .FORCE
$(CLM) $(CLMFLAGS) -s 50M -h 750M -gcm\
-I Cloogle/clean-compiler/frontend\
-I Cloogle/clean-compiler/backend\
......@@ -37,7 +31,7 @@ builddb: Cloogle/clean-compiler
-I Cloogle/clean-compiler/main/Unix\
$@ -o $@
Cloogle/clean-compiler:
Cloogle/clean-compiler: .FORCE
$(MAKE) -C Cloogle clean-compiler
$(DB): builddb
......@@ -48,3 +42,5 @@ clean:
distclean: clean
$(RM) -r clean-compiler
.FORCE:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment