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