X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Facess.ld_src%2FMakefile;h=157f02d9a953d7cafd2537f28f09ad8f11d076f9;hb=83322f5718ddc6e2e67b6c32d2a263caed780d9a;hp=405ec20384af84efb4abac797c4395b30c39a023;hpb=b98fbd4e9c71447d81fc9bd643fb174c76346e0f;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/acess.ld_src/Makefile b/Usermode/Libraries/acess.ld_src/Makefile index 405ec203..157f02d9 100644 --- a/Usermode/Libraries/acess.ld_src/Makefile +++ b/Usermode/Libraries/acess.ld_src/Makefile @@ -1,16 +1,25 @@ +# +# Acess2 +# - Common usermode linker script +# + -include ../Makefile.cfg -BIN = ../acess.ld +BIN = $(OUTPUTDIR)Libs/acess.ld .PHONY: all clean install -all: ../acess.ld +all: $(BIN) clean: - $(RM) ../acess.ld + $(RM) $(BIN) + +install: $(BIN) -install: ../acess.ld +$(BIN): acess_$(ARCHDIR).ld.h + @mkdir -p $(dir $(BIN)) + cpp -nostdinc -U i386 -P -C $< -o $@ -D__LIBDIR=$(OUTPUTDIR)Libs -../acess.ld: acess.ld.h - cpp -nostdinc -U i386 -P -C $< -o $@ -DACESSDIR=$(ACESSDIR) +acess_$(ARCHDIR).ld.h: + $(LD) --verbose | awk '{ if( substr($$0,0,5) == "====="){ bPrint = !bPrint; } else { if(bPrint){ print $$0;} } }' | sed 's/SEARCH_DIR\(.*\)/SEARCH_DIR(__LIBDIR)/' > $@