2014-11-22 17:28:05 +00:00
|
|
|
# makefile for the tests that MUST NOT compile
|
|
|
|
|
2014-11-23 11:18:19 +00:00
|
|
|
ifneq ($(shell echo),)
|
2014-12-17 22:44:39 +00:00
|
|
|
CMD_EXE := 1
|
2014-11-23 11:18:19 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CMD_EXE
|
2015-06-26 22:03:45 +00:00
|
|
|
NOT := - # Hack
|
2015-07-10 22:01:39 +00:00
|
|
|
DEL = -del /f $(subst /,\,$1)
|
2014-11-23 11:18:19 +00:00
|
|
|
else
|
2015-06-26 22:03:45 +00:00
|
|
|
NOT := !
|
2015-06-26 22:33:24 +00:00
|
|
|
DEL = $(RM) $1
|
2014-11-23 11:18:19 +00:00
|
|
|
endif
|
2014-11-22 17:28:05 +00:00
|
|
|
|
2015-08-13 21:25:52 +00:00
|
|
|
CC65 := $(if $(wildcard ../../bin/cc65*),../../bin/cc65,cc65)
|
2015-06-26 22:03:45 +00:00
|
|
|
|
2014-12-17 22:44:39 +00:00
|
|
|
WORKDIR := ../../testwrk
|
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
|
|
|
|
2015-08-13 21:25:52 +00:00
|
|
|
TESTS := $(patsubst %.c,$(WORKDIR)/%.s,$(wildcard *.c))
|
2014-11-22 17:28:05 +00:00
|
|
|
|
|
|
|
all: $(TESTS)
|
|
|
|
|
2015-08-13 21:25:52 +00:00
|
|
|
$(WORKDIR)/%.s: %.c
|
|
|
|
$(NOT) $(CC65) -o $@ $<
|
2014-12-17 22:44:39 +00:00
|
|
|
|
2014-11-22 17:28:05 +00:00
|
|
|
clean:
|
2015-07-10 22:01:39 +00:00
|
|
|
@$(call DEL,$(TESTS))
|