summaryrefslogtreecommitdiff
path: root/src/Makefile
blob: d3798bb7b178d7f49c059465417b4e71b3979318 (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
27
28
29
CC = gcc
SHELL = /usr/bin/bash

DEBUG_CFLAGS := -fanalyzer -Wanalyzer-too-complex -ggdb -g3 -Og
RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto
CFLAGS = -Wall -Wextra -Wpedantic -pedantic-errors $(DEBUG_CFLAGS)

DEBUG_LDLIBS :=
RELEASE_LDLIBS :=
LDLIBS += $(DEBUG_LDLIBS)

DEBUG_LDFLAGS :=
RELEASE_LDFLAGS := -fuse-linker-plugin -flto=auto
LDFLAGS += $(DEBUG_LDFLAGS)


BINARIES := main

.PHONY: all clean

all: main

main: main.o shared.o

main.o: main.c shared.h
shared.o: shared.c shared.h

c clean: # huh, didn't think that would work
	rm -rvf $(BINARIES) $(wildcard *.o)