aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: d6f1d56bffc82309e9c3977dc2f3c85c6392e5b5 (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=c99 -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