diff --git a/hermit/tools/Makefile b/hermit/tools/Makefile index 668b731af..37d46f8ab 100644 --- a/hermit/tools/Makefile +++ b/hermit/tools/Makefile @@ -5,7 +5,7 @@ CC = gcc CFLAGS = -O2 -Wall HEXDUMP = hexdump LDFLGAS = -EXECFILES = ../usr/examples/hello #$(shell find ../usr/examples -perm -u+r+x -type f) +INITRDFILES = ../usr/examples/hello #$(shell find ../usr/examples -perm -u+r+x -type f) PROXYFILES = $(shell find ../usr/examples -perm -u+r+x -type f) # Prettify output @@ -38,16 +38,16 @@ initrd.o: initrd.S initrd.img @echo [CC] Build initrd as object file $Q$(CC) -c -o $@ initrd.S -initrd.img: $(EXECFILES) make_initrd +initrd.img: $(INITRDFILES) make_initrd @echo [MAKE_INITRD] initrd.img - $Q./make_initrd /bin $(foreach FILE, $(EXECFILES), $(FILE) $(shell basename $(FILE))) + $Q./make_initrd /bin $(foreach FILE, $(INITRDFILES), $(FILE) $(shell basename $(FILE))) make_initrd: make_initrd.o $Q$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) proxy: $(PROXYFILES) @echo [PROXY] Create proxy files - $Q./create_proxy.sh $(foreach FILE, $(EXECFILES), $(FILE)) + $Q./create_proxy.sh $(foreach FILE, $(PROXYFILES), $(FILE)) clean: @echo Cleaning tools diff --git a/hermit/tools/create_proxy.sh b/hermit/tools/create_proxy.sh index 6c04a779a..c87a279eb 100755 --- a/hermit/tools/create_proxy.sh +++ b/hermit/tools/create_proxy.sh @@ -1,8 +1,7 @@ #!/bin/bash -if test "$#" -ne 1; then - echo "Illegal number of parameters" -else +while [[ $# > 0 ]] +do fname=$(basename "$1") fname_new=$(basename "$1")_proxy @@ -20,4 +19,7 @@ else echo ".int app_size - hermit_app" >> inc.S cc -O2 -Wall -o $fname_new proxy.c inc.S -fi + rm -rf inc.S + + shift +done