mkfile (908B)
1 # Copyright 2021 Jacob R. Edwards 2 3 cc = tcc 4 cflags = -Wall -Wno-write-strings 5 cppflags = -I/usr/local/include -I./libap 6 ldflags = -L/usr/local/lib -L./libap 7 ldlibs = -lsndfile -lao libap/libap.a 8 9 prefix = /usr/local 10 manprefix = $prefix/man 11 12 prog = ap sigap 13 14 all:V: $prog 15 16 %.o: %.c 17 $cc $cflags $cppflags -c -o $stem.o $stem.c 18 19 libap/ap.o: libap/ap.c libap/ap.h 20 21 libap/libap.a: libap/ap.o 22 ar rcs $target $newprereq 23 24 $prog: libap/libap.a ${prog:%=%.o} 25 for name in $target 26 do 27 $cc $cflags $ldflags -o $name $name.o $ldlibs 28 done 29 30 clean:V: 31 rm -f $prog libap/libap.a libap/ap.o 32 33 install:V: libap/libap.a $names 34 cp -f $prog $prefix/bin 35 cp -f libap/ap.h $prefix/include 36 for name in $prog 37 do 38 cp -f $name $prefix/bin 39 cp -f $name.1 $manprefix/man1 40 done 41 42 uninstall:V: 43 rm -f $prefix/lib/libap.a $prefix/include/ap.h 44 for name in $prog 45 do 46 rm -f $prefix/bin/$name 47 rm -f $manprefix/man1/$name.1 48 done