Cleaned up test Makefiles.

This commit is contained in:
Oliver Schmidt
2017-03-19 17:48:12 +01:00
parent 3a30669ff6
commit 66634ef683
8 changed files with 253 additions and 226 deletions

View File

@@ -1,24 +1,27 @@
# makefile for the tests that MUST NOT compile
# Makefile for the tests that MUST NOT compile
ifneq ($(shell echo),)
CMD_EXE := 1
CMD_EXE = 1
endif
ifdef CMD_EXE
NOT := - # Hack
DEL = -del /f $(subst /,\,$1)
NOT = - # Hack
MKDIR = mkdir $(subst /,\,$1)
RMDIR = -rmdir /s /q $(subst /,\,$1)
else
NOT := !
DEL = $(RM) $1
NOT = !
MKDIR = mkdir -p $1
RMDIR = $(RM) -r $1
endif
CC65 := $(if $(wildcard ../../bin/cc65*),../../bin/cc65,cc65)
WORKDIR := ../../testwrk
WORKDIR = ../../testwrk/err
.PHONY: all clean
TESTS := $(patsubst %.c,$(WORKDIR)/%.s,$(wildcard *.c))
SOURCES := $(wildcard *.c)
TESTS = $(patsubst %.c,$(WORKDIR)/%.s,$(SOURCES))
all: $(TESTS)
@@ -26,4 +29,4 @@ $(WORKDIR)/%.s: %.c
$(NOT) $(CC65) -o $@ $<
clean:
@$(call DEL,$(TESTS))
@$(call RMDIR,$(WORKDIR))