X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FLibraries%2Facess.ld_src%2FMakefile;h=09a7c8f81665e3fb818967c89b1eac5ebcdfa43e;hb=eff15be7c050cd7c614b52b997161558bfbc7ab9;hp=57a9cd9f3128719db286e45eff47adc0a67c0e19;hpb=cb8ee714fcb4fce504fd767462789093a9fecbb1;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/acess.ld_src/Makefile b/Usermode/Libraries/acess.ld_src/Makefile index 57a9cd9f..09a7c8f8 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 utest-build utest-run generate_exp all: $(BIN) @@ -17,6 +17,13 @@ clean: install: $(BIN) -$(BIN): acess.ld.h +# How does one unit test a linker script? +utest generate_exp utest-build utest-run: + @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)/' > $@