forked from endrazine/wcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (33 loc) · 1.14 KB
/
Makefile
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
31
32
33
34
35
36
37
38
39
40
41
42
#
# This file is part of the Witchcraft Compiler Collection
# Copyright 2016-2024 Jonathan Brossard
#
# Homepage: https://github.com/endrazine/wcc/
#
# This file is licensed under MIT License.
#
COMPILER_VERSION := $(shell $(CC) --version)
ifneq '' '$(findstring clang,$(COMPILER_VERSION))'
ASAN := -fsanitize=address -static-libsan
else
ASAN := -fsanitize=address -static-libasan
endif
CFLAGS := -W -Wall -Wno-discarded-qualifiers -Wno-int-conversion -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -fpie -pie -fPIC -g3 -ggdb -I../../include -I./include/sflib/ -I./include -I../../include/ -Wno-incompatible-pointer-types -fstack-protector-all -Wl,-z,relro,-z,now -DPACKAGE -DPACKAGE_VERSION -masm=intel -rdynamic -D_FORTIFY_SOURCE=2 -O2
all:
mkdir -p bin
cd src && make CFLAGS=" $(CFLAGS)"
asan: CFLAGS += $(ASAN)
asan: all
documentation:
cd src && doxygen ./tex/project.cfg
cd doc/latex && make && cp refman.pdf ../WCC_internal_documentation.pdf
clean:
cd src && make clean
rm -f ./bin/*
clean-documentation:
# rm -rf ./doc/html
rm -rf ./doc/latex
install:
cd src && make install
uninstall:
cd src && make uninstall