fix: not being abled to compile in alpine
as it is explained here[0] I put CFLAGS and LDFLAGS in the wrong order causing a failure to link [0]: https://stackoverflow.com/questions/58775599/what-could-be-causing-linking-errors-when-compiling-in-an-alpine-docker
This commit is contained in:
parent
73924ed0a6
commit
68d436202f
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -1,3 +0,0 @@
|
|||||||
winlib/* linguist-vendored
|
|
||||||
src/lib/* linguist-vendored
|
|
||||||
icon.inl linguist-vendored
|
|
3
.github/FUNDING.yml
vendored
3
.github/FUNDING.yml
vendored
@ -1,3 +0,0 @@
|
|||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
github: rxi
|
|
14
makefile
14
makefile
@ -1,21 +1,21 @@
|
|||||||
.POSIX:
|
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANPREFIX = ${PREFIX}/share/man
|
MANPREFIX = ${PREFIX}/share/man
|
||||||
#CC ?= gcc
|
CC ?= gcc
|
||||||
SRCDIR = ./src
|
SRCDIR = ./src
|
||||||
CFLAGS = -Wall -Werror -pedantic -O3 -std=c11 -fno-strict-aliasing \
|
CFLAGS = -Wall -Werror -pedantic -O2 -std=c11 -fno-strict-aliasing \
|
||||||
-I${SRCDIR} -I${PREFIX}/include/ -DLUA_USE_POSIX -D_PREFIX="${PREFIX}"
|
-I${SRCDIR} -I${PREFIX}/include/ -DLUA_USE_POSIX -D_PREFIX="${PREFIX}"
|
||||||
|
#-I/usr/include/SDL2 -I/usr/include/directfb -D_REENTRANT \
|
||||||
|
#-I/usr/include/lua5.2
|
||||||
# remove this
|
# remove this
|
||||||
LDFLAGS = -L${PREFIX}/lib -lSDL2 -lm -llua5.2
|
LDFLAGS = -L${PREFIX}/lib -L/usr/lib/lua5.2 -lpthread -lm -lSDL2 -llua
|
||||||
FILES != find ${SRCDIR} -name '*.c'
|
FILES != find ${SRCDIR} -name '*.c'
|
||||||
OBJS = ${FILES:.c=.o}
|
OBJS = ${FILES:.c=.o}
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
${CC} -c ${CFLAGS} $< -o $@
|
${CC} -c $< -o $@ ${CFLAGS}
|
||||||
|
|
||||||
lite: ${OBJS}
|
lite: ${OBJS}
|
||||||
${CC} ${LDFLAGS} -o $@ ${OBJS}
|
${CC} -o $@ ${OBJS} ${LDFLAGS}
|
||||||
|
|
||||||
install: lite
|
install: lite
|
||||||
mkdir -p ${DESTDIR}${PREFIX}/share/lite
|
mkdir -p ${DESTDIR}${PREFIX}/share/lite
|
||||||
|
Loading…
Reference in New Issue
Block a user