aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 5cc289e33b137cfd27bcbc8b749271ccb9d60354 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CC = gcc
CFLAGS = -std=gnu99 -O3 -g -Wall -Wextra -Wpedantic -masm=intel
CFLAGS += -Iinclude -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L
CFLAGS += -Wno-unused-result
LDFLAGS = -Tlinker.ld -no-pie -g -lcurl

SRC = $(wildcard *.c **/*.c)
OBJ = $(SRC:.c=.o)

.PHONY: all clean

all: app

%.o: %.c
	$(CC) -o $@ -c $< $(CFLAGS)

app: $(OBJ)
	$(CC) -o app $^ $(LDFLAGS)

clean:
	rm -rf $(OBJ) app