1
0

make stuff

This commit is contained in:
dtb 2022-06-14 17:07:27 -04:00
parent 747bbbc31b
commit 3870b56353

View File

@ -1,10 +1,8 @@
# System utilities # System utilities
CC=cc CC=cc
CFLAGS=-I include/ -I lib/ -Wall CFLAGS=-Iinclude/ -Ilib/ -g -Wall
RM=rm -f RM=rm -f
working: id
all: libraries programs all: libraries programs
cleanall: clean cleanlibraries cleanprograms cleanall: clean cleanlibraries cleanprograms
@ -32,11 +30,14 @@ cleanprograms:
$(RM) bin/simexec $(RM) bin/simexec
$(RM) bin/sleep $(RM) bin/sleep
$(RM) bin/streq $(RM) bin/streq
$(RM) bin/stris $(RM) bin/str
$(RM) bin/substitute $(RM) bin/substitute
$(RM) bin/tail $(RM) bin/tail
libraries: libshell libstr stdbool sysexits libraries: libio libshell stdbool sysexits
libio: lib/libio.c
$(CC) $(CFLAGS) -c -o build/libio.o lib/libio.c
libshell: lib/libshell.c lib/libshell.h libshell: lib/libshell.c lib/libshell.h
$(CC) $(CFLAGS) -o lib/libshell.o -c lib/libshell.c $(CC) $(CFLAGS) -o lib/libshell.o -c lib/libshell.c
@ -52,7 +53,7 @@ sysexits_bin: src/sysexits.c
sysexits: sysexits_bin sysexits: sysexits_bin
bin/sysexits >include/sysexits.h bin/sysexits >include/sysexits.h
programs: echo false nonzero simexec sleep streq stris programs: echo false id lowercase nonzero simexec sleep streq str
calculate: libstr sysexits src/calculate.c calculate: libstr sysexits src/calculate.c
$(CC) $(CFLAGS) -o src/calculate.o -c src/calculate.c $(CC) $(CFLAGS) -o src/calculate.o -c src/calculate.c
@ -79,27 +80,39 @@ nonzero: src/nonzero.c
nutshell: src/nutshell.c src/nutshell.h src/nutshell_builtins.c nutshell: src/nutshell.c src/nutshell.h src/nutshell_builtins.c
$(CC) $(CFLAGS) -o bin/nutshell src/nutshell.c $(CC) $(CFLAGS) -o bin/nutshell src/nutshell.c
runlength: noargvzero sysexits src/runlength.c roll.o: lib/libio.h src/roll.c sysexits
$(CC) $(CFLAGS) -c -o build/roll.o src/roll.c
roll: libio sysexits roll.o
$(CC) $(CFLAGS) -o bin/roll build/libio.o build/roll.o
runlength: sysexits src/runlength.c usefulmacros
$(CC) $(CFLAGS) -o bin/runlength src/runlength.c $(CC) $(CFLAGS) -o bin/runlength src/runlength.c
simexec: noargvzero sysexits src/simexec.c simexec: sysexits src/simexec.c usefulmacros
$(CC) $(CFLAGS) -o bin/simexec src/simexec.c $(CC) $(CFLAGS) -o bin/simexec src/simexec.c
streq: noargvzero sysexits src/streq.c streq: sysexits src/streq.c usefulmacros
$(CC) $(CFLAGS) -o bin/streq src/streq.c $(CC) $(CFLAGS) -o bin/streq src/streq.c
stris: libstr src/stris.c str.o: src/str.c
$(CC) $(CFLAGS) -c -o src/stris.o src/stris.c $(CC) $(CFLAGS) -o build/str.o src/str.c
$(CC) $(CFLAGS) -o bin/stris lib/libstr.o src/stris.o
sleep: libstr noargvzero sysexits src/sleep.c str: libio str.o
$(CC) $(CFLAGS) -c -o src/sleep.o src/sleep.c $(CC) $(CFLAGS) -o bin/str lib/libio.o src/str.o
$(CC) $(CFLAGS) -o bin/sleep lib/libstr.o src/sleep.o
sleep.o: libio sysexits src/sleep.c usefulmacros
$(CC) $(CFLAGS) -c -o build/sleep.o src/sleep.c
sleep: libio sleep.o
$(CC) $(CFLAGS) -o bin/sleep build/libio.o build/sleep.o
substitute: stdbool src/substitute.c substitute: stdbool src/substitute.c
$(CC) $(CFLAGS) -c -o src/substitute.o src/substitute.c $(CC) $(CFLAGS) -c -o src/substitute.o src/substitute.c
$(CC) $(CFLAGS) -o bin/substitute src/substitute.o $(CC) $(CFLAGS) -o bin/substitute src/substitute.o
usefulmacros: include/usefulmacros.h
which: libshell src/which.c which: libshell src/which.c
$(CC) $(CFLAGS) -c -o src/which.o src/which.c $(CC) $(CFLAGS) -c -o src/which.o src/which.c
$(CC) $(CFLAGS) -o bin/which lib/libshell.o src/which.o $(CC) $(CFLAGS) -o bin/which lib/libshell.o src/which.o
@ -206,16 +219,20 @@ spacer:
# 512 * 16777216 = 8GB # 512 * 16777216 = 8GB
dd bs=512 count=16777216 </dev/zero >/spacer.bin dd bs=512 count=16777216 </dev/zero >/spacer.bin
unscii-system: unscii-pkgsrc:
mkdir -p ~/.fonts cd /usr/pkgsrc/fonts/unscii
curl "http://viznut.fi/unscii/unscii-16-full.otf" >"~/.fonts/unscii-16-full.otf" make install clean clean-depends
curl "http://viznut.fi/unscii/unscii-16-full.pcf" >"~/.fonts/unscii-16-full.pcf"
curl "http://viznut.fi/unscii/unscii-16-full.ttf" >"~/.fonts/unscii-16-full.ttf"
unscii-user: unscii-system:
mkdir -p /usr/share/fonts/unscii mkdir -p /usr/share/fonts/unscii
curl "http://viznut.fi/unscii/unscii-16-full.otf" >"/usr/share/fonts/unscii/unscii-16-full.otf" curl "http://viznut.fi/unscii/unscii-16-full.otf" >"/usr/share/fonts/unscii/unscii-16-full.otf"
curl "http://viznut.fi/unscii/unscii-16-full.pcf" >"/usr/share/fonts/unscii/unscii-16-full.pcf" curl "http://viznut.fi/unscii/unscii-16-full.pcf" >"/usr/share/fonts/unscii/unscii-16-full.pcf"
curl "http://viznut.fi/unscii/unscii-16-full.ttf" >"/usr/share/fonts/unscii/unscii-16-full.ttf" curl "http://viznut.fi/unscii/unscii-16-full.ttf" >"/usr/share/fonts/unscii/unscii-16-full.ttf"
.PHONY: all clean cleanlibraries cleanprograms noargvzero stdbool sysexits unscii-user:
mkdir -p ~/.fonts
curl "http://viznut.fi/unscii/unscii-16-full.otf" >"~/.fonts/unscii-16-full.otf"
curl "http://viznut.fi/unscii/unscii-16-full.pcf" >"~/.fonts/unscii-16-full.pcf"
curl "http://viznut.fi/unscii/unscii-16-full.ttf" >"~/.fonts/unscii-16-full.ttf"
.PHONY: all clean cleanlibraries cleanprograms stdbool sysexits usefulmacros