From: mrdudz Date: Wed, 26 Nov 2014 00:38:30 +0000 (+0100) Subject: actually use optimization switches X-Git-Tag: V2.15~29^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3e8ae54759757b441901f471f2a6c0c3ab5974bd;p=cc65 actually use optimization switches --- diff --git a/test/Makefile b/test/Makefile index 842985233..b942cbcdf 100644 --- a/test/Makefile +++ b/test/Makefile @@ -37,6 +37,12 @@ dotests: $(WORKDIR)/bdiff$(EXE) @$(MAKE) -C err clean all @$(MAKE) -C misc clean all +continue: $(WORKDIR)/bdiff$(EXE) + @$(MAKE) -C val all + @$(MAKE) -C ref all + @$(MAKE) -C err all + @$(MAKE) -C misc all + clean: @$(MAKE) -C val clean @$(MAKE) -C ref clean diff --git a/test/err/Makefile b/test/err/Makefile index f7f41a03c..f0fcf3486 100644 --- a/test/err/Makefile +++ b/test/err/Makefile @@ -33,19 +33,19 @@ all: $(TESTS) $(WORKDIR)/%.prg: %.c ! $(CL65) $(CC65FLAGS) $< -o $@ $(WORKDIR)/%.o.prg: %.c - ! $(CL65) $(CC65FLAGS) $< -o $@ + ! $(CL65) -O $(CC65FLAGS) $< -o $@ $(WORKDIR)/%.os.prg: %.c - ! $(CL65) $(CC65FLAGS) $< -o $@ + ! $(CL65) -Os $(CC65FLAGS) $< -o $@ $(WORKDIR)/%.osi.prg: %.c - ! $(CL65) $(CC65FLAGS) $< -o $@ + ! $(CL65) -Osi $(CC65FLAGS) $< -o $@ $(WORKDIR)/%.osir.prg: %.c - ! $(CL65) $(CC65FLAGS) $< -o $@ + ! $(CL65) -Osir $(CC65FLAGS) $< -o $@ $(WORKDIR)/%.oi.prg: %.c - ! $(CL65) $(CC65FLAGS) $< -o $@ + ! $(CL65) -Oi $(CC65FLAGS) $< -o $@ $(WORKDIR)/%.oir.prg: %.c - ! $(CL65) $(CC65FLAGS) $< -o $@ + ! $(CL65) -Oir $(CC65FLAGS) $< -o $@ $(WORKDIR)/%.or.prg: %.c - ! $(CL65) $(CC65FLAGS) $< -o $@ + ! $(CL65) -Or $(CC65FLAGS) $< -o $@ clean: @$(RM) $(TESTS) @$(RM) $(patsubst %.c,$(WORKDIR)/%.o,$(wildcard *.c)) diff --git a/test/misc/Makefile b/test/misc/Makefile index ce1956d86..0fa550d3f 100644 --- a/test/misc/Makefile +++ b/test/misc/Makefile @@ -32,6 +32,8 @@ TESTS += $(patsubst %.c,$(WORKDIR)/%.oi.prg,$(wildcard *.c)) TESTS += $(patsubst %.c,$(WORKDIR)/%.oir.prg,$(wildcard *.c)) TESTS += $(patsubst %.c,$(WORKDIR)/%.or.prg,$(wildcard *.c)) +# FIXME: actually use/build differently optimized programs here + all: $(TESTS) # should compile, but then hangs in an endless loop diff --git a/test/ref/Makefile b/test/ref/Makefile index f14db3ecf..2a465b500 100644 --- a/test/ref/Makefile +++ b/test/ref/Makefile @@ -49,37 +49,37 @@ $(WORKDIR)/%.prg: %.c $(WORKDIR)/%.ref $(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref $(WORKDIR)/%.o.prg: %.c $(WORKDIR)/%.ref - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -O $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out $(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref $(WORKDIR)/%.os.prg: %.c $(WORKDIR)/%.ref - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Os $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out $(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref $(WORKDIR)/%.osi.prg: %.c $(WORKDIR)/%.ref - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Osi $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out $(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref $(WORKDIR)/%.osir.prg: %.c $(WORKDIR)/%.ref - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Osir $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out $(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref $(WORKDIR)/%.oi.prg: %.c $(WORKDIR)/%.ref - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Oi $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out $(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref $(WORKDIR)/%.oir.prg: %.c $(WORKDIR)/%.ref - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Oir $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out $(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref $(WORKDIR)/%.or.prg: %.c $(WORKDIR)/%.ref - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Or $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out $(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref diff --git a/test/val/Makefile b/test/val/Makefile index 591f95389..2dc4796e6 100644 --- a/test/val/Makefile +++ b/test/val/Makefile @@ -37,31 +37,31 @@ $(WORKDIR)/%.prg: %.c $(SIM65) $(SIM65FLAGS) $@ $(WORKDIR)/%.o.prg: %.c - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -O $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ $(WORKDIR)/%.os.prg: %.c - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Os $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ $(WORKDIR)/%.osi.prg: %.c - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Osi $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ $(WORKDIR)/%.osir.prg: %.c - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Osir $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ $(WORKDIR)/%.oi.prg: %.c - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Oi $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ $(WORKDIR)/%.oir.prg: %.c - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Oir $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ $(WORKDIR)/%.or.prg: %.c - $(CL65) $(CC65FLAGS) $< -o $@ + $(CL65) -Or $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ clean: