1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-26 17:36:57 +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 12:18:19 +01:00
ifneq ($(shell echo),)
2014-12-17 17:44:39 -05:00
CMD_EXE := 1
2014-11-23 12:18:19 +01:00
endif
ifdef CMD_EXE
2015-06-27 00:03:45 +02:00
NOT := - # Hack
DEL = -del /f $(subst /,\,$1)
2014-11-23 12:18:19 +01:00
else
2015-06-27 00:03:45 +02:00
NOT := !
DEL = $(RM) $1
2014-11-23 12:18:19 +01:00
endif
CC65 := $(if $(wildcard ../../bin/cc65*),../../bin/cc65,cc65)
2015-06-27 00:03:45 +02:00
2014-12-17 17:44:39 -05:00
WORKDIR := ../../testwrk
2014-11-25 12:56:45 +01:00
2014-11-23 12:18:19 +01:00
.PHONY: all clean
TESTS := $(patsubst %.c,$(WORKDIR)/%.s,$(wildcard *.c))
all: $(TESTS)
$(WORKDIR)/%.s: %.c
$(NOT) $(CC65) -o $@ $<
2014-12-17 17:44:39 -05:00
clean:
@$(call DEL,$(TESTS))