2023-07-19 14:13:35 -04:00
|
|
|
|
2023-07-19 19:27:58 -04:00
|
|
|
# Need to use g++ because the sdk headers use classes
|
|
|
|
CC=g++
|
2023-07-20 12:05:40 -04:00
|
|
|
INCLUDES=-Isrc/include/sdk/common -Isrc/include/sdk/public -Isrc/include/sdk/pm_shared -Isrc/include/sdk/engine
|
2023-07-19 19:27:58 -04:00
|
|
|
CFLAGS=-Wall -Wextra -Wno-write-strings -m32 -fPIC $(INCLUDES)
|
2023-07-23 09:49:41 -04:00
|
|
|
LDFLAGS=-lm
|
2023-07-19 14:13:35 -04:00
|
|
|
|
2023-07-29 11:35:17 -04:00
|
|
|
OBJS=obj/main.c.o obj/globals.c.o obj/cvars.c.o obj/hooks.c.o obj/detour.c.o obj/util.c.o obj/features/movement.c.o obj/features/esp.c.o obj/features/chams.c.o obj/features/aim.c.o obj/features/misc.c.o
|
2023-07-19 14:13:35 -04:00
|
|
|
BIN=libhlcheat.so
|
|
|
|
|
|
|
|
.PHONY: clean all inject
|
|
|
|
|
|
|
|
# -------------------------------------------
|
|
|
|
|
|
|
|
all: $(BIN)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OBJS)
|
|
|
|
rm -f $(BIN)
|
|
|
|
|
2023-07-19 19:27:58 -04:00
|
|
|
inject: $(BIN)
|
2023-07-19 14:13:35 -04:00
|
|
|
bash ./inject.sh
|
|
|
|
|
|
|
|
# -------------------------------------------
|
|
|
|
|
|
|
|
# -fPIC (in CFLAGS) and -shared for creating a library (shared object)
|
|
|
|
# -m32 (in CFLAGS) because of the game's arch
|
|
|
|
$(BIN): $(OBJS)
|
|
|
|
$(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS)
|
|
|
|
|
|
|
|
$(OBJS): obj/%.c.o : src/%.c
|
2023-07-20 17:20:39 -04:00
|
|
|
@mkdir -p obj/features/
|
2023-07-19 14:13:35 -04:00
|
|
|
$(CC) $(CFLAGS) -c -o $@ $< $(LDFLAGS)
|