-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (16 loc) · 1019 Bytes
/
Copy pathMakefile
File metadata and controls
21 lines (16 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CC = gcc
COMMONFLAGS = -std=c99 -D_POSIX_C_SOURCE=200112L -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat=2 -Wimport -Winit-self -Winline -Winvalid-pch -Wjump-misses-init -Wlogical-op -Werror -Wmissing-declarations -Wpedantic -Wmissing-include-dirs -Wmultichar -Wpacked -Wpointer-arith -Wstrict-aliasing=1 -Wstrict-overflow=5 -Wswitch-default -Wswitch-enum -Wundef -Wvariadic-macros -Wwrite-strings -Wc++-compat -Wdeclaration-after-statement -Wmissing-prototypes -Wnested-externs -Wunused -Wold-style-definition -Wstrict-prototypes
LIBS = -lm
DEBUGFLAGS := $(COMMONFLAGS) -DDEBUG=1 -Og
RELEASEFLAGS := $(COMMONFLAGS) -DNDEBUG -fstack-protector-all -O3
SOURCES = RandDotGraph.c
DEPS = RandDotGraph.h
# phony targets
.PHONY: clean release debug all
all: release
release: $(SOURCES) $(DEPS)
$(CC) $^ $(RELEASEFLAGS) $(LIBS) -o release.out
debug: $(SOURCES) $(DEPS)
$(CC) $^ $(DEBUGFLAGS) $(LIBS) -o debug.out
clean:
rm -f *.o *.s *.out *.gch