From a8810a464d63ee8b6aaa16fd57fec625ad45bb6c Mon Sep 17 00:00:00 2001 From: cuz Date: Thu, 6 Feb 2003 15:35:30 +0000 Subject: [PATCH] Make sure the zap target is available git-svn-id: svn://svn.cc65.org/cc65/trunk@1932 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/Makefile | 10 ++++++++-- libsrc/apple2/Makefile | 18 ++++++++++++++---- libsrc/atari/Makefile | 3 +++ libsrc/atmos/Makefile | 13 +++++++++++++ libsrc/c128/Makefile | 5 +++++ libsrc/c16/Makefile | 4 ++++ libsrc/c64/Makefile | 5 +++++ libsrc/cbm/Makefile | 13 +++++++++++++ libsrc/cbm510/Makefile | 5 +++++ libsrc/cbm610/Makefile | 5 +++++ libsrc/common/Makefile | 13 +++++++++++++ libsrc/conio/Makefile | 14 ++++++++++++++ libsrc/dbg/Makefile | 14 ++++++++++++++ libsrc/em/Makefile | 14 +++++++++++++- libsrc/joystick/Makefile | 12 ++++++++++++ libsrc/pet/Makefile | 16 +++++++++++++++- libsrc/plus4/Makefile | 5 +++++ libsrc/runtime/Makefile | 12 ++++++++++++ libsrc/tgi/Makefile | 12 ++++++++++++ libsrc/vic20/Makefile | 6 ++++++ 20 files changed, 191 insertions(+), 8 deletions(-) diff --git a/libsrc/Makefile b/libsrc/Makefile index 985dfd096..8d06be391 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -28,6 +28,7 @@ ALLTARGETS = apple2 \ #----------------------------------------------------------------------------- +.PHONY: all all: for tgt in $(ALLTARGETS); do \ $(MAKE) clean "$$tgt"lib || exit 1; \ @@ -246,10 +247,15 @@ plus4lib: .PHONY: clean clean: - @for i in common conio dbg em joystick runtime tgi $(ALLTARGETS); do \ - $(MAKE) -C $$i clean; \ + @for i in cbm common conio dbg em joystick runtime tgi $(ALLTARGETS); do\ + $(MAKE) -C $$i clean; \ done .PHONY: zap zap: clean + @for i in cbm common conio dbg em joystick runtime tgi $(ALLTARGETS); do\ + $(MAKE) -C $$i zap; \ + done @rm -f *.o *.emd *.joy *.lib *.tgi + + diff --git a/libsrc/apple2/Makefile b/libsrc/apple2/Makefile index 248cfae8b..be8fe57e8 100644 --- a/libsrc/apple2/Makefile +++ b/libsrc/apple2/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -o $@ $(AFLAGS) $(*).s @@ -11,9 +14,10 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< -C_OBJS = +#-------------------------------------------------------------------------- +# Object files -S_OBJS= _scrsize.o \ +OBJS= _scrsize.o \ break.o \ cclear.o \ cgetc.o \ @@ -32,9 +36,15 @@ S_OBJS= _scrsize.o \ where.o \ write.o -all: $(C_OBJS) $(S_OBJS) +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap + +all: $(OBJS) clean: - @rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS) + @rm -f $(OBJS) +zap: clean diff --git a/libsrc/atari/Makefile b/libsrc/atari/Makefile index a6e9555a4..dc9524321 100644 --- a/libsrc/atari/Makefile +++ b/libsrc/atari/Makefile @@ -105,3 +105,6 @@ all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) clean: @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o) +zap: clean + @rm -f $(EMDS) $(JOYS) $(TGIS) + diff --git a/libsrc/atmos/Makefile b/libsrc/atmos/Makefile index b878d96c5..893278937 100644 --- a/libsrc/atmos/Makefile +++ b/libsrc/atmos/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -o $@ $(AFLAGS) $(*).s @@ -11,13 +14,23 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + C_OBJS = S_OBJS = crt0.o \ systime.o +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap + all: $(C_OBJS) $(S_OBJS) clean: @rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS) +zap: clean + diff --git a/libsrc/c128/Makefile b/libsrc/c128/Makefile index 5aa753408..938b04222 100644 --- a/libsrc/c128/Makefile +++ b/libsrc/c128/Makefile @@ -56,6 +56,8 @@ TGIS = c128-640-200-2.tgi c128-640-480-2.tgi #-------------------------------------------------------------------------- # Targets +.PHONY: all clean zap + all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) ../runtime/zeropage.o: @@ -64,3 +66,6 @@ all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) clean: @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o) +zap: clean + @rm -f $(EMDS) $(JOYS) $(TGIS) + diff --git a/libsrc/c16/Makefile b/libsrc/c16/Makefile index 92bc518e9..3fa69d4c4 100644 --- a/libsrc/c16/Makefile +++ b/libsrc/c16/Makefile @@ -53,6 +53,8 @@ TGIS = #-------------------------------------------------------------------------- # Targets +.PHONY: all clean zap + all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) ../runtime/zeropage.o: @@ -61,4 +63,6 @@ all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) clean: @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o) +zap: clean + @rm -f $(EMDS) $(JOYS) $(TGIS) diff --git a/libsrc/c64/Makefile b/libsrc/c64/Makefile index 54b6ecb50..30cceb14b 100644 --- a/libsrc/c64/Makefile +++ b/libsrc/c64/Makefile @@ -57,6 +57,8 @@ TGIS = c64-320-200-2.tgi #-------------------------------------------------------------------------- # Targets +.PHONY: all clean zap + all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) ../runtime/zeropage.o: @@ -65,3 +67,6 @@ all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) clean: @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o) +zap: clean + @rm -f $(EMDS) $(JOYS) $(TGIS) + diff --git a/libsrc/cbm/Makefile b/libsrc/cbm/Makefile index 8abdb8104..677df6a91 100644 --- a/libsrc/cbm/Makefile +++ b/libsrc/cbm/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -o $@ $(AFLAGS) $(*).s @@ -11,6 +14,9 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + C_OBJS = cbm_dir.o \ cbm_load.o \ cbm_save.o @@ -65,8 +71,15 @@ S_OBJS = c_acptr.o \ wherey.o \ write.o +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap + all: $(C_OBJS) $(S_OBJS) clean: @rm -f *~ *.bck $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) +zap: clean + diff --git a/libsrc/cbm510/Makefile b/libsrc/cbm510/Makefile index 7c0add7d9..cc1c0c0e6 100644 --- a/libsrc/cbm510/Makefile +++ b/libsrc/cbm510/Makefile @@ -63,6 +63,8 @@ EMDS = cbm510-ram.emd #-------------------------------------------------------------------------- # Targets +.PHONY: all clean zap + all: $(OBJS) $(EMDS) $(TGIS) ../runtime/zeropage.o: @@ -71,3 +73,6 @@ all: $(OBJS) $(EMDS) $(TGIS) clean: @rm -f $(OBJS) $(EMDS:.emd=.o) $(TGIS:.tgi=.o) +zap: clean + @rm -f $(EMDS) $(JOYS) $(TGIS) + diff --git a/libsrc/cbm610/Makefile b/libsrc/cbm610/Makefile index 9fac393de..3facda076 100644 --- a/libsrc/cbm610/Makefile +++ b/libsrc/cbm610/Makefile @@ -53,6 +53,8 @@ EMDS = cbm610-ram.emd #-------------------------------------------------------------------------- # Targets +.PHONY: all clean zap + all: $(OBJS) $(EMDS) $(TGIS) ../runtime/zeropage.o: @@ -61,3 +63,6 @@ all: $(OBJS) $(EMDS) $(TGIS) clean: @rm -f $(OBJS) $(EMDS:.emd=.o) $(TGIS:.tgi=.o) +zap: clean + @rm -f $(EMDS) $(TGIS) + diff --git a/libsrc/common/Makefile b/libsrc/common/Makefile index dbaeb971e..fac52576c 100644 --- a/libsrc/common/Makefile +++ b/libsrc/common/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -g -o $@ $(AFLAGS) $(*).s @@ -11,6 +14,9 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + C_OBJS = _afailed.o \ _hextab.o \ _scanf.o \ @@ -132,6 +138,11 @@ S_OBJS = _fdesc.o \ zerobss.o +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap + all: $(C_OBJS) $(S_OBJS) clean: @@ -140,3 +151,5 @@ clean: @rm -f $(C_OBJS) @rm -f $(S_OBJS) +zap: clean + diff --git a/libsrc/conio/Makefile b/libsrc/conio/Makefile index 54a0ab75a..a6fdc8ce1 100644 --- a/libsrc/conio/Makefile +++ b/libsrc/conio/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -o $@ $(AFLAGS) $(*).s @@ -11,6 +14,9 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + OBJS = _cursor.o \ cprintf.o \ cputhex.o \ @@ -19,7 +25,15 @@ OBJS = _cursor.o \ scrsize.o \ vcprintf.o +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap + all: $(OBJS) clean: @rm -f *~ $(OBJS) + +zap: clean + diff --git a/libsrc/dbg/Makefile b/libsrc/dbg/Makefile index 326d3dfab..f3cf4ebb3 100644 --- a/libsrc/dbg/Makefile +++ b/libsrc/dbg/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -g -o $@ $(AFLAGS) $(*).s @@ -11,10 +14,18 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + C_OBJS = dbg.o S_OBJS = asmtab.o dbgdasm.o dbgdump.o dbgisram.o dbgsupp.o +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap + all: $(C_OBJS) $(S_OBJS) clean: @@ -22,3 +33,6 @@ clean: @rm -f $(C_OBJS:.o=.s) @rm -f $(C_OBJS) @rm -f $(S_OBJS) + +zap: clean + diff --git a/libsrc/em/Makefile b/libsrc/em/Makefile index 714010ee8..e53b9bbae 100644 --- a/libsrc/em/Makefile +++ b/libsrc/em/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -g -o $@ $(AFLAGS) $(*).s @@ -11,6 +14,9 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + C_OBJS = em_load.o S_OBJS = em-kernel.o \ @@ -20,8 +26,13 @@ S_OBJS = em-kernel.o \ em_map.o \ em_pagecount.o \ em_unload.o \ - em_use.o + em_use.o + + +#-------------------------------------------------------------------------- +# Targets +.PHONY: all clean zap all: $(C_OBJS) $(S_OBJS) @@ -31,4 +42,5 @@ clean: @rm -f $(C_OBJS) @rm -f $(S_OBJS) +zap: clean diff --git a/libsrc/joystick/Makefile b/libsrc/joystick/Makefile index 7ebcfd94f..a82f55ebc 100644 --- a/libsrc/joystick/Makefile +++ b/libsrc/joystick/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -g -o $@ $(AFLAGS) $(*).s @@ -11,6 +14,9 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + C_OBJS = joy_load.o S_OBJS = joy-kernel.o \ @@ -18,6 +24,10 @@ S_OBJS = joy-kernel.o \ joy_count.o \ joy_unload.o +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap all: $(C_OBJS) $(S_OBJS) @@ -27,4 +37,6 @@ clean: @rm -f $(C_OBJS) @rm -f $(S_OBJS) +zap: clean + diff --git a/libsrc/pet/Makefile b/libsrc/pet/Makefile index 80cdb6cea..bcfb680d3 100644 --- a/libsrc/pet/Makefile +++ b/libsrc/pet/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -o $@ $(AFLAGS) $(*).s @@ -11,6 +14,9 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + OBJS = _scrsize.o \ break.o \ cgetc.o \ @@ -33,9 +39,17 @@ OBJS = _scrsize.o \ ksetlfs.o \ ksetnam.o \ randomize.o \ - revers.o + revers.o + +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap all: $(OBJS) clean: @rm -f $(OBJS) + +zap: clean + diff --git a/libsrc/plus4/Makefile b/libsrc/plus4/Makefile index acc21a3d1..df257b1e8 100644 --- a/libsrc/plus4/Makefile +++ b/libsrc/plus4/Makefile @@ -76,6 +76,8 @@ TGIS = #-------------------------------------------------------------------------- # Targets +.PHONY: all clean zap + all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) ../runtime/zeropage.o: @@ -84,3 +86,6 @@ all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) clean: @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o) +zap: clean + @rm -f $(EMDS) $(JOYS) $(TGIS) + diff --git a/libsrc/runtime/Makefile b/libsrc/runtime/Makefile index d2445ec4e..ff7c4866c 100644 --- a/libsrc/runtime/Makefile +++ b/libsrc/runtime/Makefile @@ -4,12 +4,18 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + .c.s: @$(CC) $(CFLAGS) $< .s.o: @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + OBJS = add.o \ addeqsp.o \ addysp.o \ @@ -199,9 +205,15 @@ OBJS = add.o \ xor.o \ zeropage.o +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap + all: $(OBJS) clean: @rm -f *~ $(COBJS:.o=.s) $(OBJS) +zap: clean diff --git a/libsrc/tgi/Makefile b/libsrc/tgi/Makefile index a951fc195..15aa88a2b 100644 --- a/libsrc/tgi/Makefile +++ b/libsrc/tgi/Makefile @@ -4,6 +4,9 @@ .SUFFIXES: .o .s .c +#-------------------------------------------------------------------------- +# Rules + %.o: %.c @$(CC) $(CFLAGS) $< @$(AS) -g -o $@ $(AFLAGS) $(*).s @@ -11,6 +14,9 @@ %.o: %.s @$(AS) -g -o $@ $(AFLAGS) $< +#-------------------------------------------------------------------------- +# Object files + C_OBJS = tgi_load.o S_OBJS = tgi-kernel.o \ @@ -53,6 +59,11 @@ S_OBJS = tgi-kernel.o \ tgi_unload.o +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap + all: $(C_OBJS) $(S_OBJS) clean: @@ -61,4 +72,5 @@ clean: @rm -f $(C_OBJS) @rm -f $(S_OBJS) +zap: clean diff --git a/libsrc/vic20/Makefile b/libsrc/vic20/Makefile index a346795b8..7baf2b69c 100644 --- a/libsrc/vic20/Makefile +++ b/libsrc/vic20/Makefile @@ -53,6 +53,8 @@ TGIS = #-------------------------------------------------------------------------- # Targets +.PHONY: all clean zap + all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) ../runtime/zeropage.o: @@ -61,3 +63,7 @@ all: $(OBJS) $(EMDS) $(JOYS) $(TGIS) clean: @rm -f $(OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(TGIS:.tgi=.o) +zap: clean + @rm -f $(EMDS) $(JOYS) $(TGIS) + + -- 2.39.5