Makefile 635 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

test: test.icl TTY.icl TTY.dcl Clean\ System\ Files/ctty.o
Mart Lubbers's avatar
Mart Lubbers committed
10
	clm -dynamics -I $(DETECTED_OS) -I $(CLEAN_HOME)/lib/Platform -I $(CLEAN_HOME)/lib/Dynamics $(basename $<) -o $@
Mart Lubbers's avatar
Mart Lubbers committed
11 12

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
	$(CC) -c "$<" -o "$@"
Mart Lubbers's avatar
Mart Lubbers committed
15

16 17 18 19 20 21
Monitor.prj:
	cpm project $(basename $@) create
	cpm project $@ target iTasks
	cpm project $@ set -h 2000m -s 20m -dynamics
	cpm project $@ path add "$$PWD/POSIX"

Mart Lubbers's avatar
Mart Lubbers committed
22 23
cross:

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