1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 15:29:46 +00:00

scan sources just once

This commit is contained in:
mrdudz 2014-11-26 19:32:54 +01:00
parent 0387b8cf1d
commit 92ed5fd64b
4 changed files with 44 additions and 40 deletions

View File

@ -19,14 +19,15 @@ WORKDIR := ./../../testwrk
.PHONY: all clean
TESTS := $(patsubst %.c,$(WORKDIR)/%.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.o.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.os.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.osi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.osir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.oi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.oir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.or.prg,$(wildcard *.c))
SOURCES := $(wildcard *.c)
TESTS := $(SOURCES:%.c=$(WORKDIR)/%.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.o.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.os.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osi.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osir.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oi.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oir.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.or.prg)
all: $(TESTS)
@ -48,4 +49,4 @@ $(WORKDIR)/%.or.prg: %.c
! $(CL65) -Or $(CC65FLAGS) $< -o $@
clean:
@$(RM) $(TESTS)
@$(RM) $(patsubst %.c,$(WORKDIR)/%.o,$(wildcard *.c))
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.o)

View File

@ -23,14 +23,15 @@ DIFF := $(WORKDIR)/bdiff
.PHONY: all clean
TESTS := $(patsubst %.c,$(WORKDIR)/%.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.o.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.os.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.osi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.osir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.oi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.oir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.or.prg,$(wildcard *.c))
SOURCES := $(wildcard *.c)
TESTS := $(SOURCES:%.c=$(WORKDIR)/%.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.o.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.os.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osi.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osir.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oi.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oir.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.or.prg)
# FIXME: actually use/build differently optimized programs here
@ -60,7 +61,7 @@ $(WORKDIR)/sitest%prg: sitest.c
clean:
@$(RM) $(TESTS)
@$(RM) $(patsubst %.c,$(WORKDIR)/%.o,$(wildcard *.c))
@$(RM) $(patsubst %.c,$(WORKDIR)/%.out,$(wildcard *.c))
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.o)
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.out)

View File

@ -28,14 +28,15 @@ CFLAGS := -O2 -Wall -W -Wextra -fwrapv -fno-strict-overflow
REFS := $(patsubst %.c,$(WORKDIR)/%.ref,$(wildcard *.c))
TESTS := $(patsubst %.c,$(WORKDIR)/%.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.o.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.os.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.osi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.osir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.oi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.oir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.or.prg,$(wildcard *.c))
SOURCES := $(wildcard *.c)
TESTS := $(SOURCES:%.c=$(WORKDIR)/%.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.o.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.os.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osi.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osir.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oi.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oir.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.or.prg)
all: $(REFS) $(TESTS)
@ -85,7 +86,7 @@ $(WORKDIR)/%.or.prg: %.c $(WORKDIR)/%.ref
clean:
@$(RM) $(TESTS)
@$(RM) $(patsubst %.c,$(WORKDIR)/%.o,$(wildcard *.c))
@$(RM) $(patsubst %.c,$(WORKDIR)/%.out,$(wildcard *.c))
@$(RM) $(patsubst %.c,$(WORKDIR)/%.ref,$(wildcard *.c))
@$(RM) $(patsubst %.c,$(WORKDIR)/%.host,$(wildcard *.c))
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.o)
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.out)
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.ref)
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.host)

View File

@ -21,14 +21,15 @@ WORKDIR := ./../../testwrk
.PHONY: all clean
TESTS := $(patsubst %.c,$(WORKDIR)/%.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.o.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.os.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.osi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.osir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.oi.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.oir.prg,$(wildcard *.c))
TESTS += $(patsubst %.c,$(WORKDIR)/%.or.prg,$(wildcard *.c))
SOURCES := $(wildcard *.c)
TESTS := $(SOURCES:%.c=$(WORKDIR)/%.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.o.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.os.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osi.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.osir.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oi.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.oir.prg)
TESTS += $(SOURCES:%.c=$(WORKDIR)/%.or.prg)
all: $(TESTS)
@ -66,4 +67,4 @@ $(WORKDIR)/%.or.prg: %.c
clean:
@$(RM) $(TESTS)
@$(RM) $(patsubst %.c,$(WORKDIR)/%.o,$(wildcard *.c))
@$(RM) $(SOURCES:%.c=$(WORKDIR)/%.o)