X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Fld-acess_src%2FMakefile;h=eb84ad894dbdb594e6160ac79b229b7c71383fcb;hb=6b2d8029dd06b4419aec00bd24c27cf9b2fb7485;hp=4fb6ae281ac53357460cde4c5062d4876dc7e5ab;hpb=a09032f44bba55ce1e60dfab92a39cf6c909220b;p=tpg%2Facess2.git diff --git a/AcessNative/ld-acess_src/Makefile b/AcessNative/ld-acess_src/Makefile index 4fb6ae28..eb84ad89 100644 --- a/AcessNative/ld-acess_src/Makefile +++ b/AcessNative/ld-acess_src/Makefile @@ -19,21 +19,29 @@ endif CFLAGS += -Wall -Werror -g -m32 +DEPFILES = $(filter %.o.$(PLATFORM),$(OBJ)) +DEPFILES := $(DEPFILES:%.o.$(PLATFORM)=%.d.$(PLATFORM)) + .PHONY: all clean all: $(BIN) clean: - $(RM) $(BIN) $(OBJ) + $(RM) $(BIN) $(OBJ) $(DEPFILES) $(BIN): link.ld.$(PLATFORM) $(OBJ) # $(LD) -g -o $@ $(OBJ) -T link.ld.$(PLATFORM) $(CC) -g -o $@ $(OBJ) -m32 -Wl,-T,link.ld.$(PLATFORM) %.o.$(PLATFORM): %.c - $(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS) + @echo [CC] -o $@ + @$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS) + @$(CC) -M $(CPPFLAGS) -MT $@ -o $*.d.$(PLATFORM) $< # Modify the default makefile to put the executable at 1MB instead link.ld.lin: - $(LD) --verbose | awk '{ if( substr($$0,0,5) == "====="){ bPrint = !bPrint; } else { if(bPrint){ print $$0;} } }' | sed 's/\b0x0[08][0-9]*\b/0x00100000/g' > $@ + @echo Making Linker Script ($@) + @$(LD) --verbose | awk '{ if( substr($$0,0,5) == "====="){ bPrint = !bPrint; } else { if(bPrint){ print $$0;} } }' | sed 's/\b0x0[08][0-9]*\b/0x00100000/g' > $@ + +-include $(DEPFILES)