summaryrefslogtreecommitdiff
path: root/Makefile
blob: 3c47d5a132aa2610de35d9f43d8b6812178894a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.PHONY: all install install-dynamic install-static clean

PREFIX = $(HOME)/.local

CC = clang
CFLAGS = -std=c90 -Weverything -I $(PREFIX)/include
LDFLAGS = -L $(PREFIX)/lib -l ayylmao

all : ayylmao.dynamic ayylmao.static

install: install-dynamic

install-dynamic : ayylmao.dynamic
	install -m 0755 ayylmao.dynamic $(PREFIX)/bin/ayylmao

install-static : ayylmao.static
	install -m 0755 ayylmao.static $(PREFIX)/bin/ayylmao

clean :
	rm -f -- ayylmao.dynamic ayylmao.static

ayylmao.dynamic : ayylmao.c
	$(CC) ayylmao.c -o ayylmao.dynamic $(CFLAGS) $(LDFLAGS) 

ayylmao.static : ayylmao.c
	$(CC) -static ayylmao.c -o ayylmao.static $(CFLAGS) $(LDFLAGS)