aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: 65dd0ed732ed52a0bbb85e760c35472cc8d9eb4c (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
30
CC = clang

PROJECT = engine33
OBJS = main.o system.o logger.o clock.o display.o

PDIR = ./bin
.PATH: ./src

INCS = -I./include -I./include/musl -I./include/libdrm

LIBS = -L./lib/musl -L./lib/libdrm

CFLAGS = -O2 -march=native -mtune=native -std=c99 -static -w -Wall -Werror -Wextra -Wshadow -Wpedantic -D_XOPEN_SOURCE=700
#stops soypilers complaining about signals

.MAKE.JOBS = 1C


.SUFFIXES: .o .c
.c.o:
	$(CC) $(CFLAGS) -o $(.TARGET) $(INCS) -c $(.IMPSRC)


$(PROJECT): $(OBJS)
	$(CC) $(CFLAGS) $(LIBS) -o $(.TARGET) $(.OODATE)
	mv $(.TARGET) $(.ALLSRC:T) $(PDIR)

clean:
	rm bin/*.out