1
0
This commit is contained in:
dtb 2022-06-26 16:50:41 -04:00
parent e27110d9e9
commit d7eb2b3d43
4 changed files with 6 additions and 15 deletions

View File

@ -35,6 +35,7 @@ cleanprograms:
$(RM) bin/rlencode $(RM) bin/rlencode
$(RM) bin/roll $(RM) bin/roll
$(RM) bin/tail $(RM) bin/tail
$(RM) bin/true
libraries: libio libshell stdbool sysexits libraries: libio libshell stdbool sysexits
@ -56,7 +57,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 id lowercase nonzero simexec sleep streq str programs: echo false id lowercase nonzero roll simexec sleep streq str true
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
@ -136,6 +137,9 @@ tail.o: libio src/tail.c
tail: libio tail.o tail: libio tail.o
$(CC) $(CFLAGS) -o bin/tail build/libio.o build/tail.o $(CC) $(CFLAGS) -o bin/tail build/libio.o build/tail.o
true: src/true.c
$(CC) $(CFLAGS) -o bin/true src/true.c
usefulmacros: include/usefulmacros.h usefulmacros: include/usefulmacros.h
which: libshell src/which.c which: libshell src/which.c

View File

@ -1,14 +0,0 @@
#!/bin/sh
set -e
TMPDIR="/tmp/cscript/"
TMPSRC="$TMPDIR/script.c"
TMPOUT="$TMPDIR/a.out"
[ -d "$TMPDIR" ] || mkdir -p "$TMPDIR"
printf "%s" "$1" >"$TMPSRC"
cc -o "$TMPOUT" "$TMPSRC"
dd bs=1 2>/dev/null | "$TMPOUT"

View File

1
src/true.c Normal file
View File

@ -0,0 +1 @@
int main(){ return 0; }