diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2026-04-28 13:44:29 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2026-04-28 13:44:29 -0300 |
| commit | 0da6d320f757bc9241a33df06f3597598845cf0a (patch) | |
| tree | cf079dcc2794de6d4bb7a22726932f2511c37ade /makefile | |
| parent | ae23e726018bd31a25c1279600328d90207ec81c (diff) | |
| download | lua-0da6d320f757bc9241a33df06f3597598845cf0a.tar.gz lua-0da6d320f757bc9241a33df06f3597598845cf0a.tar.bz2 lua-0da6d320f757bc9241a33df06f3597598845cf0a.zip | |
Details
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -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 | ||
| 68 | LOCAL = $(TESTS) $(CWARNS) | 71 | LOCAL = $(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.) | ||
| 74 | MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX | 78 | MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX |
| 75 | MYLDFLAGS= -Wl,-E | 79 | MYLDFLAGS= -Wl,-E |
| 76 | MYLIBS= -ldl | 80 | MYLIBS= -ldl |
| 77 | 81 | ||
| 78 | 82 | ||
| 79 | CC= gcc | 83 | CC= gcc |
| 80 | CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native | 84 | # (Optionally we can use -march=native -mno-avx512f.) |
| 85 | CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common | ||
| 81 | AR= ar rc | 86 | AR= ar rc |
| 82 | RANLIB= ranlib | 87 | RANLIB= ranlib |
| 83 | RM= rm -f | 88 | RM= rm -f |
