Makefile 429 Bytes
Newer Older
Mart Lubbers's avatar
Mart Lubbers committed
1
CLEAN_HOME?=/opt/clean
2

Mart Lubbers's avatar
Mart Lubbers committed
3
ifeq ($(OS), Windows_NT)
Mart Lubbers's avatar
Mart Lubbers committed
4
DETECTED_OS=Windows
5
else
Mart Lubbers's avatar
Mart Lubbers committed
6
DETECTED_OS=POSIX
7
endif
Mart Lubbers's avatar
Mart Lubbers committed
8
9
10
11
12

test: test.icl TTY.icl TTY.dcl Clean\ System\ Files/ctty.o
	clm -dynamics -I $(DETECTED_OS) -I $(CLEAN_HOME)/lib/Dynamics $(basename $<) -o $@

Clean\ System\ Files/ctty.o: $(DETECTED_OS)/tty.c
Mart Lubbers's avatar
Mart Lubbers committed
13
	mkdir -p Clean\ System\ Files
Mart Lubbers's avatar
Mart Lubbers committed
14
	gcc -c "$<" -o "$@"
Mart Lubbers's avatar
Mart Lubbers committed
15
16

clean:
Mart Lubbers's avatar
Mart Lubbers committed
17
	$(RM) -r $(DETECTED_OS)/Clean\ System\ Files/* Clean\ System\ Files/* test