aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/makefile b/makefile
index fa165bca..8144dcb6 100644
--- a/makefile
+++ b/makefile
@@ -62,8 +62,11 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) $(CWARNGCC)
62# ASAN_OPTIONS="detect_invalid_pointer_pairs=2". 62# ASAN_OPTIONS="detect_invalid_pointer_pairs=2".
63# -fsanitize=undefined (you may need to add "-lubsan" to libs) 63# -fsanitize=undefined (you may need to add "-lubsan" to libs)
64# -fsanitize=pointer-subtract -fsanitize=address -fsanitize=pointer-compare 64# -fsanitize=pointer-subtract -fsanitize=address -fsanitize=pointer-compare
65# TESTS= -DLUA_USER_H='"ltests.h"' -Og -g
66 65
66# Test mode: Add test library, turn on asserts, redefine several
67# constants ("to give some bugs a chance"), track memory use, and add
68# debug information.
69# TESTS= -DLUA_USER_H='"ltests.h"' -Og -g
67 70
68LOCAL = $(TESTS) $(CWARNS) 71LOCAL = $(TESTS) $(CWARNS)
69 72
@@ -71,13 +74,15 @@ LOCAL = $(TESTS) $(CWARNS)
71# To enable Linux goodies, -DLUA_USE_LINUX 74# To enable Linux goodies, -DLUA_USE_LINUX
72# For C89, "-std=c89 -DLUA_USE_C89" 75# For C89, "-std=c89 -DLUA_USE_C89"
73# Note that Linux/Posix options are not compatible with C89 76# Note that Linux/Posix options are not compatible with C89
77# (For 32-bit, add option "-m32" to MYCFLAGS and MYLDFLAGS.)
74MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX 78MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX
75MYLDFLAGS= -Wl,-E 79MYLDFLAGS= -Wl,-E
76MYLIBS= -ldl 80MYLIBS= -ldl
77 81
78 82
79CC= gcc 83CC= gcc
80CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native 84# (Optionally we can use -march=native -mno-avx512f.)
85CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common
81AR= ar rc 86AR= ar rc
82RANLIB= ranlib 87RANLIB= ranlib
83RM= rm -f 88RM= rm -f