Add support for MUSL on Linux
This commit is contained in:
parent
8f8a8d1b67
commit
c3e21a5228
@ -1,4 +1,8 @@
|
||||
OS:= $(shell uname -s | tr '[A-Z]' '[a-z]' | sed 's/darwin/osx/')
|
||||
ifdef MUSL
|
||||
OS=linux-musl
|
||||
else
|
||||
OS=$(shell uname -s | tr '[A-Z]' '[a-z]' | sed 's/darwin/osx/')
|
||||
endif
|
||||
|
||||
all: magicka
|
||||
|
||||
|
29
deps/jamlib/Makefile.linux-musl
vendored
Normal file
29
deps/jamlib/Makefile.linux-musl
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
CC = cc $(CPPFLAGS) $(CFLAGS) -D__LINUX__ $(LDFLAGS) -Wall
|
||||
AR = ar -ru
|
||||
RM = rm -f
|
||||
|
||||
OBJS = crc32.o mbase.o message.o lastread.o subpack.o structrw.o
|
||||
|
||||
jamlib.a : $(OBJS)
|
||||
$(AR) jamlib.a $(OBJS)
|
||||
|
||||
crc32.o: crc32.c jam.h
|
||||
$(CC) -c crc32.c -o crc32.o
|
||||
|
||||
mbase.o: mbase.c jam.h
|
||||
$(CC) -c mbase.c -o mbase.o -D__MUSL__=1
|
||||
|
||||
message.o: message.c jam.h
|
||||
$(CC) -c message.c -o message.o
|
||||
|
||||
lastread.o: lastread.c jam.h
|
||||
$(CC) -c lastread.c -o lastread.o
|
||||
|
||||
subpack.o: subpack.c jam.h
|
||||
$(CC) -c subpack.c -o subpack.o
|
||||
|
||||
structrw.o: structrw.c jam.h
|
||||
$(CC) -c structrw.c -o structrw.o
|
||||
|
||||
clean:
|
||||
$(RM) *.o *.a
|
@ -89,7 +89,7 @@ magichat: ${JSMN}
|
||||
cd ${UTILSDIR}/magichat && ${MAKE}
|
||||
|
||||
filecenter: ${CDK}
|
||||
cd ${UTILSDIR}/filecenter && ${MAKE}
|
||||
cd ${UTILSDIR}/filecenter && ${MAKE} ${FTSLIB}
|
||||
|
||||
dosbox_shim:
|
||||
cd ${UTILSDIR}/dosbox_shim && ${MAKE}
|
||||
|
13
src/GNUmakefile.linux-musl
Normal file
13
src/GNUmakefile.linux-musl
Normal file
@ -0,0 +1,13 @@
|
||||
CC:= cc
|
||||
CFLAGS:= -std=gnu99 -I/usr/local/include
|
||||
LIBS:= -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -lmosquitto -lfts
|
||||
EXTRAOBJS:= strlcpy/strlcpy.o strlcpy/strlcat.o
|
||||
|
||||
LIBTOOLIZE:= libtoolize
|
||||
|
||||
DEPS_LUA_TARGET:= linux
|
||||
DEPS_JAMLIB_MAKEFILE:= Makefile.linux-musl
|
||||
|
||||
FTSLIB:= FTSLIB=1
|
||||
|
||||
include GNUmakefile.common
|
@ -23,7 +23,11 @@ endif
|
||||
ifeq ($(OS), Linux)
|
||||
CC=gcc
|
||||
CFLAGS=
|
||||
ifdef FTSLIB
|
||||
LDFLAGS=-lsqlite3 -lncurses -lfts
|
||||
else
|
||||
LDFLAGS=-lsqlite3 -lncurses
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
CC=cc
|
||||
|
Reference in New Issue
Block a user