aboutsummaryrefslogtreecommitdiffstats
path: root/tools/Makefile
blob: e165044ece928b317457dd2888554d60f9bb2afe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CC	= gcc
CFLAGS	= -O -g -W -Wall
LDFLAGS	= 
ifneq (,$(findstring _NT,$(shell uname -s)))
O	  = obj
X	  = .exe
else
O	  = o
X	  =
endif

all : abcprintd$(X) z80asm z80dis$(X)

.c.$(O):
	$(CC) $(CFLAGS) -c -o $@ $<

abcprintd$(X) : abcprintd.$(O) fileop.$(O)
	$(CC) $(LDFLAGS) -o $@ $^

z80dis$(X) : z80dis.$(O)
	$(CC) $(LDFLAGS) -o $@ $<

.PHONY: z80asm
z80asm :
	$(MAKE) -C $@ all

clean :
	rm -f abcprintd$(X) z80dis$(X) *.$(O)
	$(MAKE) -C z80asm clean

dist: all
	find . -name '*.$(O)' -type f -print0 | xargs -0rt rm -f