2013-03-19 18:28:32 -04:00
|
|
|
SOFTWARE_MEANT_FOR_SORTIX=1
|
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
|
2013-03-19 18:28:32 -04:00
|
|
|
OPTLEVEL=-g -O2
|
2012-09-10 17:36:15 -04:00
|
|
|
endif
|
2012-09-08 14:33:52 -04:00
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
ifndef CXXFLAGS
|
|
|
|
CXXFLAGS:=$(OPTLEVEL)
|
|
|
|
endif
|
|
|
|
|
2013-03-19 18:28:32 -04:00
|
|
|
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\"
|
2012-09-10 17:36:15 -04:00
|
|
|
CXXFLAGS:=$(CXXFLAGS) -Wall -Wextra -fno-exceptions -fno-rtti
|
|
|
|
|
|
|
|
BINARIES:=\
|
2011-12-16 00:00:42 -05:00
|
|
|
calc \
|
2011-08-27 17:03:39 -04:00
|
|
|
cat \
|
2013-02-23 11:42:23 -05:00
|
|
|
chvideomode \
|
|
|
|
clear \
|
|
|
|
column \
|
2011-11-21 08:57:02 -05:00
|
|
|
cp \
|
2011-11-25 18:54:17 -05:00
|
|
|
echo \
|
2013-02-23 11:42:23 -05:00
|
|
|
editor \
|
|
|
|
head \
|
2011-08-27 17:26:11 -04:00
|
|
|
help \
|
2013-02-23 11:42:23 -05:00
|
|
|
init \
|
2012-03-07 12:20:40 -05:00
|
|
|
kernelinfo \
|
2011-09-15 16:38:40 -04:00
|
|
|
kill \
|
2013-02-23 11:42:23 -05:00
|
|
|
ln \
|
|
|
|
ls \
|
|
|
|
memstat \
|
|
|
|
mkdir \
|
|
|
|
mxsh \
|
2011-12-26 11:15:14 -05:00
|
|
|
pager \
|
2013-02-23 11:42:23 -05:00
|
|
|
pwd \
|
|
|
|
rm \
|
|
|
|
rmdir \
|
|
|
|
sh \
|
2012-03-02 18:29:24 -05:00
|
|
|
tail \
|
2012-03-16 10:56:09 -04:00
|
|
|
type \
|
2013-02-23 11:42:23 -05:00
|
|
|
uname \
|
|
|
|
uptime \
|
2012-12-09 13:10:59 -05:00
|
|
|
which \
|
2011-08-27 17:03:39 -04:00
|
|
|
|
2013-03-19 18:28:32 -04:00
|
|
|
INSTALLBINARIES:=$(addprefix $(DESTDIR)$(BINDIR)/,$(BINARIES))
|
|
|
|
|
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
|
2013-03-19 18:28:32 -04:00
|
|
|
mkdir -p $(DESTDIR)$(BINDIR)
|
|
|
|
install $(BINARIES) $(DESTDIR)$(BINDIR)
|
2011-08-28 06:33:46 -04:00
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
uninstall:
|
2013-03-19 18:28:32 -04:00
|
|
|
rm -f $(INSTALLBINARIES) $(DESTDIR)$(BINDIR)/install
|
2011-08-27 17:03:39 -04:00
|
|
|
|
|
|
|
%: %.cpp
|
2013-03-19 18:28:32 -04:00
|
|
|
$(CXX) -std=gnu++11 $(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
|
|
|
|