mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 21:32:19 +00:00
30 lines
453 B
Makefile
30 lines
453 B
Makefile
# makefile for the tests that MUST NOT compile
|
|
|
|
ifneq ($(shell echo),)
|
|
CMD_EXE := 1
|
|
endif
|
|
|
|
ifdef CMD_EXE
|
|
NOT := - # Hack
|
|
DEL = -del /f $(subst /,\,$1)
|
|
else
|
|
NOT := !
|
|
DEL = $(RM) $1
|
|
endif
|
|
|
|
CC65 := $(if $(wildcard ../../bin/cc65*),../../bin/cc65,cc65)
|
|
|
|
WORKDIR := ../../testwrk
|
|
|
|
.PHONY: all clean
|
|
|
|
TESTS := $(patsubst %.c,$(WORKDIR)/%.s,$(wildcard *.c))
|
|
|
|
all: $(TESTS)
|
|
|
|
$(WORKDIR)/%.s: %.c
|
|
$(NOT) $(CC65) -o $@ $<
|
|
|
|
clean:
|
|
@$(call DEL,$(TESTS))
|