]> git.sur5r.net Git - cc65/blob - test/Makefile
Merge pull request #281 from polluks/sp65
[cc65] / test / Makefile
1
2 # top-level makefile for the regression tests
3
4 # You can comment this special target when you debug the regression tests.
5 # Then, make will give you more progress reports.
6 .SILENT:
7
8 ifneq ($(shell echo),)
9   CMD_EXE := 1
10 endif
11
12 ifdef CMD_EXE
13   EXE := .exe
14   DEL = -del /f $(subst /,\,$1)
15   MKDIR = mkdir $(subst /,\,$1)
16   RMDIR = -rmdir /s /q $(subst /,\,$1)
17 else
18   EXE :=
19   DEL = $(RM) $1
20   MKDIR = mkdir $1
21   RMDIR = $(RM) -r $1
22 endif
23
24 WORKDIR := ../testwrk
25
26 CC := gcc
27
28 .PHONY: all dotests continue mostly-clean clean
29
30 all: dotests
31
32 $(WORKDIR):
33         $(call MKDIR,$(WORKDIR))
34
35 $(WORKDIR)/bdiff$(EXE): bdiff.c | $(WORKDIR)
36         $(CC) -O2 -o $@ $<
37
38 .NOTPARALLEL:
39
40 dotests: mostly-clean continue
41
42 continue: $(WORKDIR)/bdiff$(EXE)
43         @$(MAKE) -C val all
44         @$(MAKE) -C ref all
45         @$(MAKE) -C err all
46         @$(MAKE) -C misc all
47
48 mostly-clean:
49         @$(MAKE) -C val clean
50         @$(MAKE) -C ref clean
51         @$(MAKE) -C err clean
52         @$(MAKE) -C misc clean
53
54 clean: mostly-clean
55         @$(call DEL,$(WORKDIR)/bdiff$(EXE))
56         @$(call RMDIR,$(WORKDIR))