mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Wire up libTom stuff to build system.
This commit is contained in:
parent
7542966e33
commit
62f6f0c7e0
3 changed files with 9 additions and 4 deletions
9
Makefile
9
Makefile
|
@ -270,6 +270,8 @@ Q3CPPDIR=$(MOUNT_DIR)/tools/lcc/cpp
|
|||
Q3LCCETCDIR=$(MOUNT_DIR)/tools/lcc/etc
|
||||
Q3LCCSRCDIR=$(MOUNT_DIR)/tools/lcc/src
|
||||
AUTOUPDATERSRCDIR=$(MOUNT_DIR)/autoupdater
|
||||
LIBTOMCRYPTSRCDIR=$(AUTOUPDATERSRCDIR)/rsa_tools/libtomcrypt-1.17
|
||||
TOMSFASTMATHSRCDIR=$(AUTOUPDATERSRCDIR)/rsa_tools/tomsfastmath-0.13.1
|
||||
LOKISETUPDIR=misc/setup
|
||||
NSISDIR=misc/nsis
|
||||
SDLHDIR=$(MOUNT_DIR)/SDL2
|
||||
|
@ -376,7 +378,7 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")
|
|||
|
||||
THREAD_LIBS=-lpthread
|
||||
LIBS=-ldl -lm
|
||||
AUTOUPDATER_LIBS += -ldl
|
||||
AUTOUPDATER_LIBS += -ldl $(LIBTOMCRYPTSRCDIR)/libtomcrypt.a $(TOMSFASTMATHSRCDIR)/libtfm.a
|
||||
|
||||
CLIENT_LIBS=$(SDL_LIBS)
|
||||
RENDERER_LIBS = $(SDL_LIBS) -lGL
|
||||
|
@ -419,6 +421,8 @@ ifeq ($(PLATFORM),darwin)
|
|||
RENDERER_LIBS=
|
||||
OPTIMIZEVM=
|
||||
|
||||
AUTOUPDATER_LIBS += $(LIBTOMCRYPTSRCDIR)/libtomcrypt.a $(TOMSFASTMATHSRCDIR)/libtfm.a
|
||||
|
||||
# Default minimum Mac OS X version
|
||||
ifeq ($(MACOSX_VERSION_MIN),)
|
||||
MACOSX_VERSION_MIN=10.7
|
||||
|
@ -1601,12 +1605,11 @@ $(Q3ASM): $(Q3ASMOBJ)
|
|||
|
||||
define DO_AUTOUPDATER_CC
|
||||
$(echo_cmd) "AUTOUPDATER_CC $<"
|
||||
$(Q)$(CC) $(CFLAGS) $(CURL_CFLAGS) -o $@ -c $<
|
||||
$(Q)$(CC) $(CFLAGS) -I$(LIBTOMCRYPTSRCDIR)/src/headers -I$(TOMSFASTMATHSRCDIR)/src/headers $(CURL_CFLAGS) -o $@ -c $<
|
||||
endef
|
||||
|
||||
Q3AUTOUPDATEROBJ = \
|
||||
$(B)/autoupdater/autoupdater.o \
|
||||
$(B)/autoupdater/sha256.o
|
||||
|
||||
$(B)/autoupdater/%.o: $(AUTOUPDATERSRCDIR)/%.c
|
||||
$(DO_AUTOUPDATER_CC)
|
||||
|
|
|
@ -10,6 +10,8 @@ if [ "$OSTYPE" = "Linux" ]; then
|
|||
let NCPU=$NCPU+1
|
||||
elif [ "$OSTYPE" = "Darwin" ]; then
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
export CFLAGS="$CFLAGS -mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070"
|
||||
export LDFLAGS="$LDFLAGS -mmacosx-version-min=10.7"
|
||||
elif [ "$OSTYPE" = "SunOS" ]; then
|
||||
NCPU=`/usr/sbin/psrinfo |wc -l |sed -e 's/^ *//g;s/ *$//g'`
|
||||
else
|
||||
|
|
|
@ -7,7 +7,7 @@ export TFMDIR="tomsfastmath-0.13.1"
|
|||
export LTCDIR="libtomcrypt-1.17"
|
||||
|
||||
function build {
|
||||
clang -I $TFMDIR/src/headers -I $LTCDIR/src/headers -o "$1" -Wall -O3 "$1.c" rsa_common.c $LTCDIR/libtomcrypt.a $TFMDIR/libtfm.a
|
||||
clang -mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -I $TFMDIR/src/headers -I $LTCDIR/src/headers -o "$1" -Wall -O3 "$1.c" rsa_common.c $LTCDIR/libtomcrypt.a $TFMDIR/libtfm.a
|
||||
}
|
||||
|
||||
set -e
|
||||
|
|
Loading…
Reference in a new issue