Delete Makefiles and libraries for MacOS X

This commit is contained in:
Minsoo Choo 2022-03-16 10:43:28 -03:00
parent e6f0f7f23d
commit b66c290a95
7 changed files with 13 additions and 95 deletions

View file

@ -26,38 +26,10 @@ BUILD_OBJ_DIR=$(BUILD_DIR)/obj
ARCH=i386
ELF-GC-DYNSTR=./elf-gc-dynstr
ifeq ($(OS),Linux)
CPLUS="g++ -m32"
CPP_LIB:=-L$(shell g++ -m32 -print-file-name=libstdc++.so | xargs dirname) -lstdc++ -ldl -lpthread
endif
ifeq ($(OS),Darwin)
OSXVER := $(shell sw_vers -productVersion)
DEVELOPER_DIR := $(shell /usr/bin/xcode-select -print-path)
ifeq (,$(findstring 10.7, $(OSXVER)))
BUILDING_ON_LION := 0
COMPILER_BIN_DIR := $(DEVELOPER_DIR)/usr/bin
SDK_DIR := $(DEVELOPER_DIR)/SDKs
else
BUILDING_ON_LION := 1
COMPILER_BIN_DIR := $(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin
SDK_DIR := $(DEVELOPER_DIR)/Platforms/MacOSX.platform/Developer/SDKs
endif
#SDKROOT ?= $(SDK_DIR)/MacOSX10.6.sdk
SDKROOT ?= $(SDK_DIR)/MacOSX10.8.sdk
ARCH_FLAGS ?= -arch i386 -m32 -march=prescott -gdwarf-2 -g2 -Wno-typedef-redefinition -momit-leaf-frame-pointer -mtune=core2
CPP_LIB=-lstdc++ -lpthread
ifeq ($(origin AR), default)
AR = libtool -static -o
endif
ifeq ($(origin CXX), default)
CPLUS ="$(COMPILER_BIN_DIR)/clang++ -Qunused-arguments -isysroot $(SDKROOT) -mmacosx-version-min=10.5 -fasm-blocks -I$(SDKROOT)/usr/include/malloc $(ARCH_FLAGS)"
endif
LINK ?= $(CXX)
endif
CLINK=$(CPLUS)
@ -73,40 +45,17 @@ else
ARCH_CFLAGS_AMD64=-m64 -gdwarf-2 -g2
endif
ifeq ($(OS),Linux)
ARCH_CFLAGS_I486+=-march=pentium-m -mfpmath=387
ARCH_CFLAGS_I686+=-march=pentium-m -mfpmath=387
ARCH_CFLAGS_AMD+=-march=k6 -mfpmath=387
endif
ifeq ($(OS),Darwin)
# force 387 for FP math so the precision between win32 and linux and osx match
ARCH_CFLAGS_I486+=-march=pentium-m -mfpmath=387
ARCH_CFLAGS_I686+=-march=pentium-m -mfpmath=387
ARCH_CFLAGS_AMD+=-mfpmath=387
endif
ARCH_CFLAGS="$(ARCH_CFLAGS_I486)"
BASE_CFLAGS=-std=c++17 -fpermissive -fno-strict-aliasing -DNDEBUG -DPOSIX -D_POSIX -DLINUX -D_LINUX -DGNUC -DNO_MALLOC_OVERRIDE -fno-exceptions -fexpensive-optimizations -Werror=return-type
BASE_CFLAGS+=-w
ifeq ($(OS),Darwin)
BASE_CFLAGS += -DOSX -D_OSX -fvisibility=hidden
else
BASE_CFLAGS+= -DLINUX -D_LINUX
endif
ifeq ($(OS),Darwin)
SHLIBEXT=dylib
SHLIBCFLAGS=
ifeq "$(CFG)" "release"
SHLIBLDFLAGS="-shared"
else
SHLIBLDFLAGS="-shared -gdwarf-2 -g2"
endif
else
SHLIBEXT=so
SHLIBCFLAGS=
ifeq "$(CFG)" "release"
@ -114,7 +63,7 @@ else
else
SHLIBLDFLAGS="-shared -gdwarf-2 -g2 -Wl,-Map,$@_map.txt"
endif
endif
AR=ar
LIBEXT=a
MAKE+= -j8

View file

@ -21,11 +21,7 @@ CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS) -DCLIENT_DLL -DCLIENT_WEAPONS -I/usr/includ
INCLUDEDIRS=-I$(HL_SRC_DIR) -I$(HL_PARTICLEMAN_DIR) -I../dlls -I$(COMMON_SRC_DIR) -I$(PUBLIC_SRC_DIR) -I../pm_shared -I../engine -I../utils/vgui/include -I ../game_shared -I../external
ifeq ($(OS),Darwin)
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -framework Carbon $(CFG)/vgui.dylib -L. -lSDL2-2.0.0
else
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -L$(CFG) vgui.so -L. libSDL2-2.0.so.0
endif
DO_CC=$(CPLUS) $(INCLUDEDIRS) $(CFLAGS) -o $@ -c $<
DO_PUBLIC_CC=$(CPLUS) $(INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<

View file

@ -1,11 +1,5 @@
#!/bin/bash
UNAME=`uname`
if [ "$UNAME" == "Darwin" ]; then
dsymutil $1
exit 0;
fi
OBJCOPY=objcopy
function usage {

Binary file not shown.

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.libSDL2-2.0.0.dylib</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View file

@ -1 +0,0 @@
libSDL2-2.0.0.dylib