1
0
src/Makefile

177 lines
4.3 KiB
Makefile
Raw Normal View History

2022-05-27 15:58:49 -06:00
# System utilities
2022-05-14 18:52:07 -06:00
CC=cc
2022-05-27 15:58:49 -06:00
CFLAGS=-I include/ -I lib/ -Wall
2022-05-14 18:52:07 -06:00
RM=rm -f
all: libraries programs
cleanall: clean cleanlibraries cleanprograms
clean:
$(RM) src/*.o
cleanlibraries:
$(RM) lib/libshell.o
$(RM) lib/libstr.o
cleanprograms:
$(RM) bin/add
$(RM) bin/cut
$(RM) bin/echo
$(RM) bin/eq
$(RM) bin/false
$(RM) bin/fdivide
$(RM) bin/gt
$(RM) bin/lowercase
$(RM) bin/lt
$(RM) bin/mm
$(RM) bin/multiply
$(RM) bin/nonzero
$(RM) bin/simexec
$(RM) bin/sleep
$(RM) bin/streq
$(RM) bin/stris
$(RM) bin/substitute
$(RM) bin/tail
libraries: libshell libstr stdbool sysexits
libshell: lib/libshell.c lib/libshell.h
$(CC) $(CFLAGS) -o lib/libshell.o -c lib/libshell.c
libstr: lib/libstr.c lib/libstr.h
$(CC) $(CFLAGS) -o lib/libstr.o -c lib/libstr.c
stdbool: include/stdbool.h
2022-05-27 15:58:49 -06:00
sysexits_bin: src/sysexits.c
2022-05-14 18:52:07 -06:00
$(CC) $(CFLAGS) -o bin/sysexits src/sysexits.c
2022-05-27 15:58:49 -06:00
sysexits: sysexits_bin
2022-05-14 18:52:07 -06:00
bin/sysexits >include/sysexits.h
programs: echo false nonzero simexec sleep streq stris
calculate: libstr sysexits src/calculate.c
$(CC) $(CFLAGS) -o src/calculate.o -c src/calculate.c
$(CC) $(CFLAGS) -o bin/calculate lib/libstr.o src/calculate.o
echo: sysexits src/echo.c
$(CC) $(CFLAGS) -o bin/echo src/echo.c
false: src/false.c
$(CC) $(CFLAGS) -o bin/false src/false.c
id: stdbool sysexits src/id.c
$(CC) $(CFLAGS) -o bin/id src/id.c
levenshtein: src/levenshtein.c
$(CC) $(CFLAGS) -o bin/levenshtein src/levenshtein.c
lowercase: sysexits src/lowercase.c
$(CC) $(CFLAGS) -o bin/lowercase src/lowercase.c
nonzero: src/nonzero.c
$(CC) $(CFLAGS) -o bin/nonzero src/nonzero.c
runlength: noargvzero sysexits src/runlength.c
$(CC) $(CFLAGS) -o bin/runlength src/runlength.c
simexec: noargvzero sysexits src/simexec.c
$(CC) $(CFLAGS) -o bin/simexec src/simexec.c
streq: noargvzero sysexits src/streq.c
$(CC) $(CFLAGS) -o bin/streq src/streq.c
stris: libstr src/stris.c
$(CC) $(CFLAGS) -c -o src/stris.o src/stris.c
$(CC) $(CFLAGS) -o bin/stris lib/libstr.o src/stris.o
sleep: libstr noargvzero sysexits src/sleep.c
$(CC) $(CFLAGS) -c -o src/sleep.o src/sleep.c
$(CC) $(CFLAGS) -o bin/sleep lib/libstr.o src/sleep.o
substitute: stdbool src/substitute.c
$(CC) $(CFLAGS) -c -o src/substitute.o src/substitute.c
$(CC) $(CFLAGS) -o bin/substitute src/substitute.o
which: libshell src/which.c
$(CC) $(CFLAGS) -c -o src/which.o src/which.c
$(CC) $(CFLAGS) -o bin/which lib/libshell.o src/which.o
2022-05-27 15:58:49 -06:00
# Convenience
PROGRAMS= \
alsa-plugins-nice alsa-utils \
anki audacious \
curl wget \
dvdbackup ffmpeg mpv \
vlc \
awk nawk sed moreutils \
ed vim \
feh ffmpeg imagemagick \
gcc \
git mercurial \
gparted \
gperf gwenview \
htop powertop \
inetutils iptables k3b \
kate kdenlive krita \
lame linux-headers lynx \
macchanger make \
man-pages man-pages-posix \
moc \
net-tools \
nmap p7zip pkgfile \
progress \
pulseaudio pulseaudio-alsa pulseaudio-utils \
pulsemixer \
python3 qbittorrent qemu \
rsync s-tui \
screen tmux twin \
scrot sed smartmontools \
thunar thunderbird \
ttf-liberation tlp \
units \
unrar unzip \
util-linux \
virt-manager \
wireguard-tools \
xclip \
xf86-input-libinput xf86-input-wacom xf86-video-intel \
xscreensaver xterm \
zathura zathura-cb zathura-djvu \
zathura-ps
2022-06-02 18:11:41 -06:00
alpine-programs:
2022-05-27 15:58:49 -06:00
apk add $(PROGRAMS)
2022-06-02 18:11:41 -06:00
arch-yay:
git clone "https://aur.archlinux.org/yay.git" || true
cd yay
git pull
makepkg -si
yay -V
2022-05-27 16:05:00 -06:00
spacer:
# creates an 8GB empty file in the root dir
# that way when the alarm bells go off you can delete it to save a
# couple minutes before the system really runs out of disk
#
# 512 * 16777216 = 8GB
dd bs=512 count=16777216 </dev/zero >/spacer.bin
2022-06-02 18:11:41 -06:00
unscii-system:
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"
unscii-user:
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.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"
2022-05-14 18:52:07 -06:00
.PHONY: all clean cleanlibraries cleanprograms noargvzero stdbool sysexits