diff --git a/libsrc/Makefile b/libsrc/Makefile index a3dbc684d..79f720eec 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -16,6 +16,7 @@ LD = ../../src/ld65/ld65 # List of shared directories SHAREDDIRS = cbm \ common \ + geos-common \ conio \ dbg \ em \ @@ -250,7 +251,7 @@ cbm610lib: .PHONY: geos-cbmlib geos-cbmlib: - for i in runtime geos-cbm common conio em joystick tgi zlib; do \ + for i in runtime geos-cbm geos-common common conio em joystick tgi zlib; do \ $(MAKE) SYS=geos-cbm -C $$i || exit 1; \ $(AR) a geos-cbm.lib $$i/*.o || exit 1; \ done diff --git a/libsrc/geos-cbm/Makefile b/libsrc/geos-cbm/Makefile index 5218045a1..787b55cf7 100644 --- a/libsrc/geos-cbm/Makefile +++ b/libsrc/geos-cbm/Makefile @@ -48,7 +48,6 @@ DIRS = common \ conio \ devel \ disk \ - dlgbox \ file \ graph \ menuicon \ diff --git a/libsrc/geos-common/Makefile b/libsrc/geos-common/Makefile new file mode 100644 index 000000000..e884c1bd5 --- /dev/null +++ b/libsrc/geos-common/Makefile @@ -0,0 +1,51 @@ +# +# makefile for CC65 runtime library +# + +.SUFFIXES: .o .s .c + +#-------------------------------------------------------------------------- +# Programs and flags + +SYS = geos-cbm + +AS = ../../src/ca65/ca65 +CC = ../../src/cc65/cc65 +LD = ../../src/ld65/ld65 + +AFLAGS = -t $(SYS) --forget-inc-paths -I../$(SYS) -I../../asminc +CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include + +#-------------------------------------------------------------------------- +# Rules + +%.o: %.c + @$(CC) -o $(notdir $(*).s) $(CFLAGS) $< + @$(AS) -o $@ $(AFLAGS) $(*).s + +%.o: %.s + @$(AS) -g -o $@ $(AFLAGS) $< + +#-------------------------------------------------------------------------- +# Directories + +DIRS = dlgbox + +#-------------------------------------------------------------------------- +# Directives + +include $(addsuffix /Makefile, $(DIRS)) +vpath %.c $(DIRS) +vpath %.s $(DIRS) + +#-------------------------------------------------------------------------- +# Targets + +.PHONY: all clean zap + +all: $(C_OBJS) $(S_OBJS) + +clean: + @$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) + +zap: clean diff --git a/libsrc/geos-cbm/dlgbox/Makefile b/libsrc/geos-common/dlgbox/Makefile similarity index 100% rename from libsrc/geos-cbm/dlgbox/Makefile rename to libsrc/geos-common/dlgbox/Makefile diff --git a/libsrc/geos-cbm/dlgbox/dbget2lines.s b/libsrc/geos-common/dlgbox/dbget2lines.s similarity index 100% rename from libsrc/geos-cbm/dlgbox/dbget2lines.s rename to libsrc/geos-common/dlgbox/dbget2lines.s diff --git a/libsrc/geos-cbm/dlgbox/dlgboxfileselect.s b/libsrc/geos-common/dlgbox/dlgboxfileselect.s similarity index 100% rename from libsrc/geos-cbm/dlgbox/dlgboxfileselect.s rename to libsrc/geos-common/dlgbox/dlgboxfileselect.s diff --git a/libsrc/geos-cbm/dlgbox/dlgboxgetstring.s b/libsrc/geos-common/dlgbox/dlgboxgetstring.s similarity index 100% rename from libsrc/geos-cbm/dlgbox/dlgboxgetstring.s rename to libsrc/geos-common/dlgbox/dlgboxgetstring.s diff --git a/libsrc/geos-cbm/dlgbox/dlgboxok.s b/libsrc/geos-common/dlgbox/dlgboxok.s similarity index 100% rename from libsrc/geos-cbm/dlgbox/dlgboxok.s rename to libsrc/geos-common/dlgbox/dlgboxok.s diff --git a/libsrc/geos-cbm/dlgbox/dlgboxokcancel.s b/libsrc/geos-common/dlgbox/dlgboxokcancel.s similarity index 100% rename from libsrc/geos-cbm/dlgbox/dlgboxokcancel.s rename to libsrc/geos-common/dlgbox/dlgboxokcancel.s diff --git a/libsrc/geos-cbm/dlgbox/dlgboxyesno.s b/libsrc/geos-common/dlgbox/dlgboxyesno.s similarity index 100% rename from libsrc/geos-cbm/dlgbox/dlgboxyesno.s rename to libsrc/geos-common/dlgbox/dlgboxyesno.s diff --git a/libsrc/geos-cbm/dlgbox/dodlgbox.s b/libsrc/geos-common/dlgbox/dodlgbox.s similarity index 100% rename from libsrc/geos-cbm/dlgbox/dodlgbox.s rename to libsrc/geos-common/dlgbox/dodlgbox.s diff --git a/libsrc/geos-cbm/dlgbox/messagebox.c b/libsrc/geos-common/dlgbox/messagebox.c similarity index 100% rename from libsrc/geos-cbm/dlgbox/messagebox.c rename to libsrc/geos-common/dlgbox/messagebox.c diff --git a/libsrc/geos-cbm/dlgbox/rstrfrmdialogue.s b/libsrc/geos-common/dlgbox/rstrfrmdialogue.s similarity index 100% rename from libsrc/geos-cbm/dlgbox/rstrfrmdialogue.s rename to libsrc/geos-common/dlgbox/rstrfrmdialogue.s