3 # - Common usermode linker script
7 -include ../Makefile.cfg
9 BIN = $(OUTPUTDIR)Libs/acess.ld
11 .PHONY: all clean install utest generate_exp
20 # How does one unit test a linker script?
24 $(BIN): acess_$(ARCHDIR).ld.h
25 @mkdir -p $(dir $(BIN))
26 cpp -nostdinc -U i386 -P -C $< -o $@ -D__LIBDIR=$(OUTPUTDIR)Libs
28 acess_$(ARCHDIR).ld.h:
29 $(LD) --verbose | awk '{ if( substr($$0,0,5) == "====="){ bPrint = !bPrint; } else { if(bPrint){ print $$0;} } }' | sed 's/SEARCH_DIR\(.*\)/SEARCH_DIR(__LIBDIR)/' > $@