# Makefile for simple (i.e., single-file) commands l=/usr/lib CC=exec cc CFLAGS= -s -i -m -D_MINIX -D_POSIX_SOURCE -I/include PRINTK= -Dprintf=printk -Dfprintf=fprintk # The normal printf routine provided by MINIX is quite large (5K), at least # by MINIX standards, because it has to include all kinds of weird features # required by the ANSI standard. However, many programs do not need all # these features. These programs can get away with a much simpler version # of printf (and fprintf) called printk (and fprintk). The stunt below with # OBJ1 and OBJ2 divides the contents of this directory into files that can # use printk (OBJ1) and those that cannot (OBJ2). OBJ1=animals ascii backup badblocks banner basename cal cat cd cdiff \ cgrep chmem chmod chown cksum clr cmp comm cp crc \ date dd decomp16 df dhrystone diskcheck du dw echo expand expr factor \ fgrep file find fix fold fortune fsck gather getlf getty grep gres \ head hyphenate id ifdef inodes join kill leave ln login look lpr machine \ man men mkdir mkfifo mknod modem more mount mv ncheck od \ paste pathchk prep pretty printenv printroot proto pwd readall recover \ rev rm rmdir shar size sleep sort split strings strip stty su \ sum swapfs sync tail tee term test time touch tr traverse treecmp tset \ tsort ttt tty umount uname unexpand uniq update vol wc \ whatsnew which whoami width xargs OBJ2=at atrun btoa calendar ci co compress cron cut diff diskusage ed fsck2 \ last ls mail mkfs mkproto mref nm passwd pr ps readfs roff sed tar \ termcap unshar users uud uue who write OBJ3=life gomoku all: $(OBJ1) $(OBJ2) $(OBJ1): @echo ----------------------------- $@ ------------------------------- @$(CC) $(CFLAGS) $(PRINTK) -o bin/$@ $@.c @chmem =8192 bin/$@ >/dev/null 2>&1 $(OBJ2): @echo ----------------------------- $@ ------------------------------- @$(CC) $(CFLAGS) -o bin/$@ $@.c @chmem =8192 bin/$@ >/dev/null 2>&1 $(OBJ3): @echo ----------------------------- $@ ------------------------------- @$(CC) $(CFLAGS) -o bin/$@ $@.c -lcurses @chmem =30000 bin/$@ >/dev/null 2>&1 clean: @rm -f *.o *.s *.bak