2011-08-27 17:03:39 -04:00
|
|
|
# Set up variables such that we can easily cross-compile.
|
|
|
|
OSROOT=..
|
|
|
|
include ../crosscompilemakefile.mak
|
|
|
|
|
2011-08-28 06:33:46 -04:00
|
|
|
INITRDDIR:=../initrd
|
|
|
|
LOCALBINARIES:=\
|
2011-08-27 17:03:39 -04:00
|
|
|
init \
|
|
|
|
cat \
|
|
|
|
sh \
|
|
|
|
mxsh \
|
|
|
|
clear \
|
2011-08-27 17:26:11 -04:00
|
|
|
ls \
|
|
|
|
help \
|
|
|
|
uname \
|
2011-09-21 14:52:29 -04:00
|
|
|
idle \
|
2011-08-27 17:03:39 -04:00
|
|
|
|
2011-09-06 09:55:56 -04:00
|
|
|
BINARIES:=$(addprefix $(INITRDDIR)/,$(LOCALBINARIES))
|
2011-08-28 06:33:46 -04:00
|
|
|
|
|
|
|
all: install
|
|
|
|
|
|
|
|
install: $(LOCALBINARIES)
|
|
|
|
cp $(LOCALBINARIES) $(INITRDDIR)
|
|
|
|
rm -f $(LOCALBINARIES)
|
2011-08-27 17:03:39 -04:00
|
|
|
|
|
|
|
%: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -O2 -c $< -o $@.o
|
|
|
|
$(LD) $(LDFLAGS) $@.o -o $@ $(LIBS)
|
|
|
|
|
|
|
|
sh: mxsh
|
2011-08-28 06:33:46 -04:00
|
|
|
cp $< $@
|
2011-08-27 17:03:39 -04:00
|
|
|
|
|
|
|
clean:
|
2011-08-28 06:33:46 -04:00
|
|
|
rm -f $(BINARIES) $(LOCALBINARIES) *.o
|
2011-08-27 17:03:39 -04:00
|
|
|
|