Mac buildfixes

This commit is contained in:
Ethan Lee 2021-11-10 13:44:21 -05:00
parent 48026d780c
commit 9d58e2ead2
3 changed files with 15 additions and 2 deletions

View file

@ -1,6 +1,13 @@
# Makefile for Thirty Flights of Loving Game DLL
# Written by Ethan "flibitijibibo" Lee
ifeq ($(shell uname), Darwin)
SUFFIX = dylib
else
SUFFIX = so
LDFLAGS := -Wl,--no-undefined
endif
TFOL_SRC = \
g_abel_camshoot.c \
g_abel_civspawner.c \
@ -90,7 +97,7 @@ TFOL_SRC = \
acesrc/acebot_spawn.c
all:
$(CC) -o baseq2/kmq2gamex86_64.so -g -w -Wl,--no-undefined -fpic -fPIC -shared $(TFOL_SRC) -lSDL2 -lm
$(CC) -o baseq2/kmq2gamex86_64.$(SUFFIX) -g -w $(LDFLAGS) -fpic -fPIC -shared $(TFOL_SRC) -lSDL2 -lm
cp ../../kmquake2-tfol/quake2/kmquake2 .
clean:

View file

@ -37,7 +37,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#ifndef __APPLE__
#include <malloc.h>
#endif
#define N 4096 /* size of ring buffer */
#define F 18 /* upper limit for match_length */

View file

@ -123,7 +123,11 @@ OLD FOG SYSTEM
#include <SDL2/SDL.h>
#endif
#define __MSC__
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
fog_t gfogs[MAX_FOGS];