Makefile - Fix mtest target (and clean up utest targets)
[tpg/acess2.git] / Usermode / Libraries / acess.ld_src / Makefile
1 #
2 # Acess2
3 # - Common usermode linker script
4 #
5
6
7 -include ../Makefile.cfg
8
9 BIN = $(OUTPUTDIR)Libs/acess.ld
10
11 .PHONY: all clean install utest utest-build utest-run generate_exp
12
13 all: $(BIN)
14
15 clean:
16         $(RM) $(BIN)
17
18 install: $(BIN)
19
20 # How does one unit test a linker script?
21 utest generate_exp utest-build utest-run:
22         @echo > /dev/null
23
24 $(BIN): acess_$(ARCHDIR).ld.h
25         @mkdir -p $(dir $(BIN))
26         cpp -nostdinc -U i386 -P -C $< -o $@ -D__LIBDIR=$(OUTPUTDIR)Libs
27
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)/' > $@

UCC git Repository :: git.ucc.asn.au