Skip to content

Commit

Permalink
改用submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
lakwsh committed Jul 21, 2024
1 parent 9d37c04 commit 3d3b9a4
Show file tree
Hide file tree
Showing 13 changed files with 311 additions and 471 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '**.yml'
schedule:
- cron: '30 03 01 */3 *'
workflow_dispatch:

jobs:
build_linux:
Expand All @@ -29,6 +30,7 @@ jobs:
path: hl2sdk-l4d2
- uses: actions/checkout@v4
with:
submodules: 'true'
path: l4dtoolz
- name: Build L4DToolZ
working-directory: l4dtoolz
Expand All @@ -47,6 +49,7 @@ jobs:
path: hl2sdk-l4d2
- uses: actions/checkout@v4
with:
submodules: 'true'
path: l4dtoolz
- name: Setup msbuild
uses: microsoft/setup-msbuild@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "sigtool"]
path = sigtool
url = [email protected]:lakwsh/sigtool.git
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT = l4dtoolz
OBJECTS = l4dtoolz.cpp signature.cpp
OBJECTS = l4dtoolz.cpp sigtool/mem.cpp

CPP = gcc

Expand All @@ -13,16 +13,16 @@ LIB_SUFFIX = _srv.$(LIB_EXT)

LINK += $(HL2LIB)/tier1_i486.a $(LIB_PREFIX)vstdlib$(LIB_SUFFIX) $(LIB_PREFIX)tier0$(LIB_SUFFIX)

INCLUDE += -I. -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/vstdlib -I$(HL2PUB)/tier0 \
-I$(HL2PUB)/tier1 -I$(HL2PUB)/game/server
INCLUDE += -I. -Isigtool -I$(HL2PUB)/engine -I$(HL2PUB)/game/server \
-I$(HL2PUB) -I$(HL2PUB)/vstdlib -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1

BINARY = $(PROJECT).$(LIB_EXT)
BIN_DIR = Release
LINK += -shared

CFLAGS += -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -D_snprintf=snprintf \
-Dstrnicmp=strncasecmp -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp \
-std=c++11 -Wall -Werror -fPIC -fno-exceptions -fno-rtti -msse -m32 -Ofast -pipe -D_LINUX \
-D_LINUX -std=c++11 -Wall -Werror -fPIC -fno-exceptions -fno-rtti -msse -m32 -Ofast -pipe \
-fvisibility=hidden -fvisibility-inlines-hidden -static-libgcc -fno-strict-aliasing

OBJ_BIN := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
Expand All @@ -31,7 +31,7 @@ $(BIN_DIR)/%.o: %.cpp
$(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<

all:
mkdir -p $(BIN_DIR)
mkdir -p $(BIN_DIR)/sigtool
ln -sf $(HL2LIB)/$(LIB_PREFIX)vstdlib$(LIB_SUFFIX)
ln -sf $(HL2LIB)/$(LIB_PREFIX)tier0$(LIB_SUFFIX)
$(MAKE) -f Makefile l4dtoolz
Expand All @@ -44,4 +44,3 @@ default: all
clean:
rm -rf $(BIN_DIR)
rm -f *$(LIB_SUFFIX)

Loading

0 comments on commit 3d3b9a4

Please sign in to comment.