2017-03-19 16:48:12 +00:00
|
|
|
# Makefile for the tests that MUST NOT compile
|
2014-11-22 17:28:05 +00:00
|
|
|
|
2014-11-23 11:18:19 +00:00
|
|
|
ifneq ($(shell echo),)
|
2017-03-19 16:48:12 +00:00
|
|
|
CMD_EXE = 1
|
2014-11-23 11:18:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CMD_EXE
|
2017-03-20 10:22:04 +00:00
|
|
|
S = $(subst /,\,/)
|
2017-03-19 16:48:12 +00:00
|
|
|
NOT = - # Hack
|
2017-03-20 10:22:04 +00:00
|
|
|
NULLDEV = nul:
|
2017-03-19 16:48:12 +00:00
|
|
|
MKDIR = mkdir $(subst /,\,$1)
|
|
|
|
RMDIR = -rmdir /s /q $(subst /,\,$1)
|
2014-11-23 11:18:19 +00:00
|
|
|
else
|
2017-03-20 10:22:04 +00:00
|
|
|
S = /
|
2017-03-19 16:48:12 +00:00
|
|
|
NOT = !
|
2017-03-20 10:22:04 +00:00
|
|
|
NULLDEV = /dev/null
|
2017-03-19 16:48:12 +00:00
|
|
|
MKDIR = mkdir -p $1
|
|
|
|
RMDIR = $(RM) -r $1
|
2014-11-23 11:18:19 +00:00
|
|
|
endif
|
2014-11-22 17:28:05 +00:00
|
|
|
|
2017-03-20 10:22:04 +00:00
|
|
|
ifdef QUIET
|
|
|
|
.SILENT:
|
|
|
|
NULLERR = 2>$(NULLDEV)
|
|
|
|
endif
|
|
|
|
|
|
|
|
CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65)
|
2015-06-26 22:03:45 +00:00
|
|
|
|
2017-03-19 16:48:12 +00:00
|
|
|
WORKDIR = ../../testwrk/err
|
2014-11-25 11:56:45 +00:00
|
|
|
|
2014-11-23 11:18:19 +00:00
|
|
|
.PHONY: all clean
|
2014-11-22 17:28:05 +00:00
|
|
|
|
2017-03-19 16:48:12 +00:00
|
|
|
SOURCES := $(wildcard *.c)
|
|
|
|
TESTS = $(patsubst %.c,$(WORKDIR)/%.s,$(SOURCES))
|
2014-11-22 17:28:05 +00:00
|
|
|
|
|
|
|
all: $(TESTS)
|
|
|
|
|
2015-08-13 21:25:52 +00:00
|
|
|
$(WORKDIR)/%.s: %.c
|
2017-03-20 10:22:04 +00:00
|
|
|
$(if $(QUIET),echo err/$*.s)
|
|
|
|
$(NOT) $(CC65) -o $@ $< $(NULLERR)
|
2014-12-17 22:44:39 +00:00
|
|
|
|
2014-11-22 17:28:05 +00:00
|
|
|
clean:
|
2017-03-19 16:48:12 +00:00
|
|
|
@$(call RMDIR,$(WORKDIR))
|