Fix mode command and hostnames ending with .
[cloogle-irc.git] / Makefile
1 CLEAN_HOME?=/opt/clean
2 CLM:=clm
3
4 override CLMFLAGS+=-nt
5 GCCVERSIONGTEQ6:=$(shell expr `gcc -dumpversion | cut -f1 -d.` \>= 6)
6 ifeq "$(GCCVERSIONGTEQ6)" "1"
7 override CLMFLAGS+=-l -no-pie
8 endif
9
10 CLMLIBS:=\
11 -I $(CLEAN_HOME)/lib/Platform\
12 -I $(CLEAN_HOME)/lib/Platform/Deprecated/StdLib\
13 -I $(CLEAN_HOME)/lib/Generics\
14 -I $(CLEAN_HOME)/lib/TCPIP\
15 -I $(CLEAN_HOME)/lib/Dynamics\
16 -I ./libcloogle
17
18 BINARIES:=IRC cloogle
19
20 all: $(BINARIES)
21
22 %: %.icl $(wildcard */*.[id]cl *.[id]cl)
23 $(CLM) $(CLMLIBS) $(CLMFLAGS) $(basename $<) -o $@
24
25 clean:
26 $(RM) -r $(BINARIES) Clean\ System\ Files