2011-08-11 16:51:04 -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:=\
|
|
|
|
pong \
|
2011-08-28 18:09:37 -04:00
|
|
|
conway \
|
2011-08-11 16:51:04 -04:00
|
|
|
|
2011-09-06 09:55:56 -04:00
|
|
|
BINARIES:=$(addprefix $(INITRDDIR)/,$(LOCALBINARIES))
|
2011-08-11 16:51:04 -04:00
|
|
|
|
2011-08-28 06:33:46 -04:00
|
|
|
all: install
|
|
|
|
|
|
|
|
install: $(LOCALBINARIES)
|
|
|
|
cp $(LOCALBINARIES) $(INITRDDIR)
|
|
|
|
rm -f $(LOCALBINARIES)
|
|
|
|
|
|
|
|
%: %.cpp
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -O2 -c $< -o $@.o
|
|
|
|
$(LD) $(LDFLAGS) $@.o -o $@ $(LIBS)
|
|
|
|
|
|
|
|
sh: mxsh
|
|
|
|
cp $< $@
|
2011-08-11 16:51:04 -04:00
|
|
|
|
|
|
|
clean:
|
2011-08-28 06:33:46 -04:00
|
|
|
rm -f $(BINARIES) $(LOCALBINARIES) *.o
|
2011-08-11 16:51:04 -04:00
|
|
|
|