sortix-mirror/utils/Makefile
Jonas 'Sortie' Termansen fa6d445b0d Added type(1), a replacement for the "traditional" Sortix cat(1).
cat(1) now work as you would expect.
2012-03-16 15:56:09 +01:00

50 lines
639 B
Makefile

# Set up variables such that we can easily cross-compile.
OSROOT=..
include ../crosscompilemakefile.mak
INITRDDIR:=../initrd
LOCALBINARIES:=\
init \
calc \
cat \
cp \
echo \
rm \
sh \
mxsh \
clear \
ls \
pwd \
help \
uptime \
memstat \
uname \
kernelinfo \
idle \
editor \
kill \
column \
pager \
head \
tail \
type \
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