2011-12-02 06:27:58 -05:00
|
|
|
# Set up variables such that we can easily cross-compile.
|
|
|
|
OSROOT=..
|
|
|
|
include ../crosscompilemakefile.mak
|
|
|
|
|
2012-09-08 14:33:52 -04:00
|
|
|
CXXFLAGS:=$(CXXFLAGS) -Wall -Wextra
|
|
|
|
|
2011-12-02 06:27:58 -05:00
|
|
|
INITRDDIR:=../initrd
|
|
|
|
LOCALBINARIES:=\
|
|
|
|
benchsyscall \
|
2011-12-02 16:39:18 -05:00
|
|
|
benchctxswitch \
|
2011-12-02 06:27:58 -05:00
|
|
|
|
|
|
|
BINARIES:=$(addprefix $(INITRDDIR)/,$(LOCALBINARIES))
|
|
|
|
|
|
|
|
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 $< $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(BINARIES) $(LOCALBINARIES) *.o
|
|
|
|
|