diff --git a/main/source/linux/Makefile b/main/source/linux/Makefile index 3f0e3a30..fd8e2663 100644 --- a/main/source/linux/Makefile +++ b/main/source/linux/Makefile @@ -131,6 +131,7 @@ all: build_dir targets TARGETS= TARGETS+= \ + particles \ ns \ hl_cdll \ @@ -140,6 +141,8 @@ build_dir: targets: $(TARGETS) +particles: + cd ../particles && make && cd ../linux && cp ../particles/libpart* . hl_cdll: build_dir $(MAKE_hl_cdll) ARCH=i686 CC=$(CC) CPLUS=$(CPLUS) CPP_LIB="$(CPP_LIB)" BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) SOURCE_DIR=$(SOURCE_DIR) ENGINE_SRC_DIR=$(ENGINE_SRC_DIR) MOD_SRC_DIR=$(MOD_SRC_DIR) COMMON_SRC_DIR=$(COMMON_SRC_DIR) BASE_CFLAGS="$(BASE_CFLAGS)" PUBLIC_SRC_DIR=$(PUBLIC_SRC_DIR) DBG_SRC_DIR=$(DBG_SRC_DIR) ARCH_CFLAGS="$(ARCH_CFLAGS_I686)" GAME_SHARED_SRC_DIR=$(GAME_SHARED_SRC_DIR) CLINK=$(CLINK) PM_SRC_DIR=$(PM_SRC_DIR) SHLIBEXT=$(SHLIBEXT) SHLIBCFLAGS=$(SHLIBCFLAGS) SHLIBLDFLAGS=$(SHLIBLDFLAGS) CFG=$(CFG) OS=$(OS) @@ -148,4 +151,5 @@ ns: build_dir $(MAKE_HL_LIB) CC=$(CC) ARCH=$(ARCH) CPP_LIB="$(CPP_LIB)" BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) SOURCE_DIR=$(SOURCE_DIR) ENGINE_SRC_DIR=$(ENGINE_SRC_DIR) COMMON_SRC_DIR=$(COMMON_SRC_DIR) PM_SRC_DIR=$(PM_SRC_DIR) GAME_SHARED_SRC_DIR=$(GAME_SHARED_SRC_DIR) GAMEDB_SRC_DIR=$(GAMEDB_SRC_DIR) BASE_CFLAGS="$(BASE_CFLAGS)" SHLIBEXT=$(SHLIBEXT) SHLIBCFLAGS=$(SHLIBCFLAGS) SHLIBLDFLAGS=$(SHLIBLDFLAGS) PUBLIC_SRC_DIR=$(PUBLIC_SRC_DIR) CFG=$(CFG) OS=$(OS) ARCH_CFLAGS="$(ARCH_CFLAGS_I686)" clean: + make -f ../particles/Makefile clean -rm -rf $(BUILD_OBJ_DIR) diff --git a/main/source/linux/Makefile.hl_cdll b/main/source/linux/Makefile.hl_cdll index ec46bcef..7a246002 100644 --- a/main/source/linux/Makefile.hl_cdll +++ b/main/source/linux/Makefile.hl_cdll @@ -13,6 +13,7 @@ HL_SERVER_SRC_DIR=$(SOURCE_DIR)/dlls GAME_SHARED_SRC_DIR=$(SOURCE_DIR)/game_shared PM_SHARED_SRC_DIR=$(SOURCE_DIR)/pm_shared TEXTREP_SRC_DIR=$(SOURCE_DIR)/textrep +PARTICLES_SRC_DIR=$(SOURCE_DIR)/particles TEXTREP_OBJ_DIR=$(HL1_OBJ_DIR)/textrep UTIL_OBJ_DIR=$(HL1_OBJ_DIR)/util diff --git a/main/source/linux/libparticleMP.a b/main/source/linux/libparticleMP.a deleted file mode 100644 index 39516034..00000000 Binary files a/main/source/linux/libparticleMP.a and /dev/null differ diff --git a/main/source/linux/libparticles.dylib b/main/source/linux/libparticles.dylib deleted file mode 100755 index e1ad52ad..00000000 Binary files a/main/source/linux/libparticles.dylib and /dev/null differ diff --git a/main/source/particles/Makefile b/main/source/particles/Makefile index b4ebad78..3f0a453b 100644 --- a/main/source/particles/Makefile +++ b/main/source/particles/Makefile @@ -11,12 +11,21 @@ GLUT_HOME =/usr/local/contrib/unmoderated MP = #-mp -DPARTICLE_MP +OS:=$(shell uname) + # Make it real fast on an Origin 2000. #LNO =-LNO:opt=1:fusion=2:fission=2:fusion_peeling_limit=2048:cs1=32K:cs2=8M COPT = $(MP) -O3 $(LNO) -fPIC CFLAGS = $(COPT) $(COMPFLAGS) -I. -I.. -I$(GLUT_HOME)/include -I/usr/include/c++/4.8/ -I../common -I../public -I../pm_shared -I../engine +ifeq ($(OS),Darwin) +SLIBB = $(C++) -dynamiclib -undefined suppress -flat_namespace *.o -o libparticles.dylib +CFLAGS += -target i386-apple-darwin -DCMAKE_OSX_ARCHITECTURES=i386 +else +SLIBB = ar clq $@ $(POBJS) +endif + POBJS =action_api.o actions.o HLRender.o opengl.o system.o ALL = libparticleMP.a @@ -31,7 +40,7 @@ all: $(ALL) libparticleMP.a: $(POBJS) rm -f $@ - ar clq $@ $(POBJS) + $(SLIBB) SPDir: (make) diff --git a/main/source/particles/libparticleMP.a b/main/source/particles/libparticleMP.a deleted file mode 100644 index 39516034..00000000 Binary files a/main/source/particles/libparticleMP.a and /dev/null differ diff --git a/main/source/particles/opengl.cpp b/main/source/particles/opengl.cpp index 2f48a566..10cf849e 100644 --- a/main/source/particles/opengl.cpp +++ b/main/source/particles/opengl.cpp @@ -9,9 +9,12 @@ #ifdef WIN32 // This is for something in gl.h. #include +#include +#else +#include +#define NULL 0 #endif -#include // XXX #include // Emit OpenGL calls to draw the particles. These are drawn with