projects/aports·blob master · refs

18 lines · 525 B

1Use pkg-config to detect cflags
2--- a/src/makefile
3+++ b/src/makefile
4@@ -170,11 +170,13 @@ SOCKET_macosx=usocket.o
5 #------
6 # Compiler and linker settings
7 # for Linux
8+LUAPC=lua$(LUAV)
9+LUA_CFLAGS=$(shell pkg-config --cflags $(LUAPC))
10 SO_linux=so
11 O_linux=o
12 CC_linux=gcc
13 DEF_linux=-DLUASOCKET_$(DEBUG)
14-CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \
15+CFLAGS_linux=$(LUA_CFLAGS) $(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \
16 -Wimplicit -O2 -ggdb3 -fpic
17 LDFLAGS_linux=-O -shared -fpic -o
18 LD_linux=gcc