1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-06 13:29:01 +00:00
cc65/test/err/Makefile

30 lines
453 B
Makefile
Raw Normal View History

# 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
DEL = -del /f $(subst /,\,$1)
2014-11-23 11:18:19 +00:00
else
2015-06-26 22:03:45 +00:00
NOT := !
DEL = $(RM) $1
2014-11-23 11:18:19 +00:00
endif
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
TESTS := $(patsubst %.c,$(WORKDIR)/%.s,$(wildcard *.c))
all: $(TESTS)
$(WORKDIR)/%.s: %.c
$(NOT) $(CC65) -o $@ $<
2014-12-17 22:44:39 +00:00
clean:
@$(call DEL,$(TESTS))