Makefile 1.4 KB
Newer Older
Camil Staps's avatar
Camil Staps committed
1
BIN:=CloogleServer builddb
2
DB=types.json
3
MAN:=builddb.1 # Others don't have --help/--version # $(addsuffix .1,$(BIN))
Camil Staps's avatar
Camil Staps committed
4
CLM:=clm
Camil Staps's avatar
Camil Staps committed
5
CLMFLAGS:=-dynamics -h 200M -nr -nt\
Camil Staps's avatar
Camil Staps committed
6 7 8 9
	-I $$CLEAN_HOME/lib/ArgEnv\
	-I $$CLEAN_HOME/lib/Dynamics\
	-I $$CLEAN_HOME/lib/Generics\
	-I $$CLEAN_HOME/lib/TCPIP\
10
	-I Cloogle\
Camil Staps's avatar
Camil Staps committed
11
	-I Cloogle/libcloogle\
12 13 14 15 16 17 18
	-I Cloogle/clean-platform/src/libraries/OS-Independent\
	-I Cloogle/clean-platform/src/libraries/OS-Independent/Deprecated/StdLib\
	-I Cloogle/clean-platform/src/libraries/OS-Linux-64\
	-I Cloogle/clean-platform/src/libraries/OS-Linux\
	-I Cloogle/clean-platform/src/libraries/OS-Posix\
	-I Cloogle/CleanTypeUnifier\
	-I Cloogle/CleanPrettyPrint\
Camil Staps's avatar
Camil Staps committed
19 20 21 22
	-I clean-compiler/frontend\
	-I clean-compiler/backend\
	-I clean-compiler/main\
	-I clean-compiler/main/Unix
23 24

.SECONDARY: $(PRJ)
25
.PHONY: all clean distclean
26

27
all: $(BIN) $(DB)
28

29
clean-compiler:
30
	svn checkout -r 2746 https://svn.cs.ru.nl/repos/clean-compiler/branches/itask/ clean-compiler
31 32
	$(MAKE) -j -C clean-compiler/main/Unix
	$(MAKE) -j -C clean-compiler/backendC/CleanCompilerSources -f Makefile.linux64
33 34
	ln -s ../../backendC/CleanCompilerSources/backend.a clean-compiler/backend/Clean\ System\ Files/backend_library

35 36 37 38 39
man: $(MAN)

%.1: %
	help2man -N ./$< > $@

Camil Staps's avatar
Camil Staps committed
40 41
$(BIN): clean-compiler .FORCE
	$(CLM) $(CLMFLAGS) $@ -o $@
42 43

$(DB): builddb
Camil Staps's avatar
Camil Staps committed
44
	./$< > $(DB)
45 46

clean:
Camil Staps's avatar
Camil Staps committed
47
	$(RM) -r 'Clean System Files' $(BIN) $(MAN) $(DB)
48 49 50

distclean: clean
	$(RM) -r clean-compiler
Camil Staps's avatar
Camil Staps committed
51 52

.FORCE: