add example programs into the initrd

This commit is contained in:
Stefan Lankes 2015-01-18 09:39:22 +01:00
parent a9de2d2641
commit f8bb08ccf2

View file

@ -1,8 +1,8 @@
MAKE = make
CC = gcc
CFLAGS = -O2 -Wall #-m32
CFLAGS = -O2 -Wall -m32
LDFLGAS =
FILE = ../README.md
EXECFILES = $(shell find ../newlib/examples -perm -u+r+x -type f)
# other implicit rules
%.o : %.c
@ -13,7 +13,7 @@ default: all
all: make_initrd initrd.img
initrd.img: $(EXECFILES) make_initrd
./make_initrd /tmp $(FILE) $(shell basename $(FILE))
./make_initrd /bin $(foreach FILE, $(EXECFILES), $(FILE) $(shell basename $(FILE)))
make_initrd: make_initrd.o
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)