X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hexed%2FMakefile;h=894c439bd94ecbab10f1139dc0248ba560a42ccc;hb=6f93f411b27296f8a96761061312cd70a15c8884;hp=f480c1531087238dbd36652a459da30cafd00d56;hpb=d13f0e289f5e87d65926c09ba46b72d4e94eaeb3;p=megadrive.git diff --git a/hexed/Makefile b/hexed/Makefile index f480c15..894c439 100644 --- a/hexed/Makefile +++ b/hexed/Makefile @@ -1,27 +1,36 @@ CROSS = m68k-elf- +CC = $(CROSS)gcc AS = $(CROSS)as LD = $(CROSS)ld OBJCOPY = $(CROSS)objcopy ASFLAGS += -m68000 --register-prefix-optional --bitwise-or -pic +CPPFLAGS += -Wa,-m68000 -Wa,--register-prefix-optional -Wa,--bitwise-or -Wa,-pic TARGET = hexed.bin -OBJS = sega_gcc.o hexed.o font.o +OBJS = sega_gcc.o hexed.o transfer.o font.o -all : $(TARGET) +all: $(TARGET) -$(TARGET) : a.out +$(TARGET): a.out $(OBJCOPY) -I elf32-m68k -O binary $^ $@ -a.out : $(OBJS) +a.out: $(OBJS) $(LD) -Tmd.ld -Map $(TARGET).map $^ clean: - $(RM) $(TARGET) $(OBJS) $(TARGET).map a.out + $(RM) $(TARGET) $(OBJS) $(TARGET).map a.out pc_transfer + pc_transfer: pc_transfer.c gcc -Wall -O2 -ggdb -o $@ $^ +%.o: %.S + $(CC) -c -o $@ $^ $(CPPFLAGS) + +%.bin: %.o + $(OBJCOPY) -I elf32-m68k -O binary $^ $@ + # ----------- release ----------- ifneq ($(findstring rel,$(MAKECMDGOALS)),)