2012-09-10 17:36:15 -04:00
|
|
|
include ../compiler.mak
|
|
|
|
include ../version.mak
|
|
|
|
include ../dirs.mak
|
2011-08-27 17:03:39 -04:00
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
ifndef OPTLEVEL
|
|
|
|
OPTLEVEL=-O2
|
|
|
|
endif
|
2012-09-08 14:33:52 -04:00
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
ifndef CXXFLAGS
|
|
|
|
CXXFLAGS:=$(OPTLEVEL)
|
|
|
|
endif
|
|
|
|
|
|
|
|
CXXFLAGS:=$(CXXFLAGS) -Wall -Wextra -fno-exceptions -fno-rtti
|
|
|
|
|
|
|
|
BINARIES:=\
|
2011-08-27 17:03:39 -04:00
|
|
|
init \
|
2011-12-16 00:00:42 -05:00
|
|
|
calc \
|
2011-08-27 17:03:39 -04:00
|
|
|
cat \
|
2011-11-21 08:57:02 -05:00
|
|
|
cp \
|
2011-11-25 18:54:17 -05:00
|
|
|
echo \
|
2011-11-21 12:49:55 -05:00
|
|
|
rm \
|
2011-08-27 17:03:39 -04:00
|
|
|
sh \
|
|
|
|
mxsh \
|
|
|
|
clear \
|
2011-08-27 17:26:11 -04:00
|
|
|
ls \
|
2012-02-29 18:27:30 -05:00
|
|
|
pwd \
|
2011-08-27 17:26:11 -04:00
|
|
|
help \
|
2011-11-28 10:28:56 -05:00
|
|
|
uptime \
|
2011-11-26 14:14:57 -05:00
|
|
|
memstat \
|
2012-05-23 11:01:53 -04:00
|
|
|
chvideomode \
|
2011-08-27 17:26:11 -04:00
|
|
|
uname \
|
2012-03-07 12:20:40 -05:00
|
|
|
kernelinfo \
|
2011-11-18 18:56:55 -05:00
|
|
|
editor \
|
2011-09-15 16:38:40 -04:00
|
|
|
kill \
|
2012-03-01 08:36:56 -05:00
|
|
|
column \
|
2011-12-26 11:15:14 -05:00
|
|
|
pager \
|
2012-03-02 18:29:24 -05:00
|
|
|
head \
|
|
|
|
tail \
|
2012-03-16 10:56:09 -04:00
|
|
|
type \
|
2011-08-27 17:03:39 -04:00
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
all: $(BINARIES)
|
|
|
|
|
|
|
|
.PHONY: all install uninstall clean
|
2011-08-28 06:33:46 -04:00
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
install: all
|
|
|
|
mkdir -p $(INSTALLBINDIR)/$(HOST)
|
|
|
|
install $(BINARIES) $(INSTALLBINDIR)/$(HOST)
|
2011-08-28 06:33:46 -04:00
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
uninstall:
|
|
|
|
for FILE in $(INSTALLBINDIR); do \
|
|
|
|
rm -f $(INSTALLBINDIR)/$(HOST)/$$FILE; \
|
|
|
|
done
|
2011-08-27 17:03:39 -04:00
|
|
|
|
|
|
|
%: %.cpp
|
2012-09-10 17:36:15 -04:00
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $< -o $@
|
2011-08-27 17:03:39 -04:00
|
|
|
|
|
|
|
sh: mxsh
|
2011-08-28 06:33:46 -04:00
|
|
|
cp $< $@
|
2011-08-27 17:03:39 -04:00
|
|
|
|
|
|
|
clean:
|
2012-09-10 17:36:15 -04:00
|
|
|
rm -f $(BINARIES) *.o
|
2011-08-27 17:03:39 -04:00
|
|
|
|