X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Facess.ld_src%2FMakefile;h=25a5c56538954b3f59139cca857ebf4186fbaac6;hb=a4c5446b23df108289ea71df2b63a7e26ab19375;hp=2628b140f99b03dcba003a4357854f59b052dbee;hpb=7681237dd0061c95dd4b22ca1b5c8c3c8b8fae2e;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/acess.ld_src/Makefile b/Usermode/Libraries/acess.ld_src/Makefile index 2628b140..25a5c565 100644 --- a/Usermode/Libraries/acess.ld_src/Makefile +++ b/Usermode/Libraries/acess.ld_src/Makefile @@ -8,7 +8,7 @@ BIN = $(OUTPUTDIR)Libs/acess.ld -.PHONY: all clean install +.PHONY: all clean install utest generate_exp all: $(BIN) @@ -17,6 +17,13 @@ clean: install: $(BIN) +# How does one unit test a linker script? +utest generate_exp: + @echo > /dev/null + $(BIN): acess_$(ARCHDIR).ld.h @mkdir -p $(dir $(BIN)) cpp -nostdinc -U i386 -P -C $< -o $@ -D__LIBDIR=$(OUTPUTDIR)Libs + +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)/' > $@