summaryrefslogtreecommitdiff
path: root/Makefile
blob: b6ef5fef426477cb07cd83cb30e95e63138d52bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
all: lolcat

musl/lib/libc.a musl/lib/crt1.o:
	cd musl; ./configure
	make -C musl

lolcat: lolcat.c musl/lib/libc.a musl/lib/crt1.o
	gcc -c -std=c11 -Wall -Imusl/include -o lolcat.o lolcat.c
	gcc -s -nostartfiles -nodefaultlibs -nostdinc -static -ffunction-sections -fdata-sections -Wl,--gc-sections -o lolcat lolcat.o musl/lib/crt1.o musl/lib/libc.a

install: lolcat
	install lolcat /usr/local/bin

clean:
	rm -f lolcat lolcat.o

.PHONY: install clean