diff --git a/.gitignore b/.gitignore index 4ec2a56..e5361bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ x86_64-pc-windows *.o *.dll -original.cpp \ No newline at end of file +*.7z diff --git a/Makefile b/Makefile index 3f5cc5a..20cb469 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,12 @@ ${TARGET}/%.o: %.c @echo BUILD $@ @${CC} -c ${CFLAGS} $< -o $@ +.PHONY: SDL +SDL: + @mkdir -p SDL/${SDL_TARGET} + @cd SDL/${SDL_TARGET} && ../configure --build=x86_64-linux-gnu --host=${SDL_TARGET} --disable-sdl2-config --disable-shared --enable-assertions=release --enable-directx --enable-haptic + @make -s -C SDL/${SDL_TARGET} + .PHONY: ${OUT} ${OUT}: dirs ${DEPS} ${OBJ} @echo LINK $@ @@ -40,8 +46,15 @@ fmt: clean: rm -rf ${TARGET} -.PHONY: SDL -SDL: - @mkdir -p SDL/${SDL_TARGET} - @cd SDL/${SDL_TARGET} && ../configure --build=x86_64-linux-gnu --host=${SDL_TARGET} --disable-sdl2-config --disable-shared --enable-assertions=release --enable-directx --enable-haptic - @make -s -C SDL/${SDL_TARGET} +.PHONY: patches +patches: + make -C patches/8.18 + +.PHONY: dist +dist: options ${OUT} ${patches} + mkdir -p out/plugins + cp ${TARGET}/${OUT}.dll out/ + cp ${TARGET}/patches.*.dll out/plugins + cp dist/* out/ + cd out && 7z a -t7z ../${OUT}.7z . + rm -rf out diff --git a/patches/8.18/Makefile b/patches/8.18/Makefile index ef804da..447e5aa 100644 --- a/patches/8.18/Makefile +++ b/patches/8.18/Makefile @@ -1,8 +1,8 @@ -OUT = patches.818 +OUT = patches.8.18 CC := clang TARGET := x86_64-pc-windows-gnu SRC = dllmain.c -OBJ = ${addprefix ${TARGET}/,${SRC:.c=.o}} +OBJ = ${addprefix ../../${TARGET}/patches/8.18/,${SRC:.c=.o}} EXTERN_SRC = tomlc99/toml.c minhook/src/buffer.c minhook/src/hook.c minhook/src/trampoline.c minhook/src/hde/hde32.c minhook/src/hde/hde64.c EXTERN_OBJ = ${addprefix ../../${TARGET}/,${EXTERN_SRC:.c=.o}} CFLAGS = -std=c99 -I../../src -I../../minhook/include -I../../tomlc99 -Wall -Ofast -target ${TARGET} -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=_WIN32_WINNT_WIN7 @@ -13,7 +13,7 @@ all: options ${OUT} .PHONY: dirs dirs: - @mkdir -p ${TARGET} + @mkdir -p ../../${TARGET}/patches/8.18 .PHONY: options options: @@ -21,11 +21,11 @@ options: @echo "LDFLAGS = ${LDFLAGS}" @echo "CC = ${CC}" -${TARGET}/%.o: %.c +../../${TARGET}/patches/8.18/%.o: %.c @echo BUILD $@ @${CC} -c ${CFLAGS} $< -o $@ .PHONY: ${OUT} ${OUT}: dirs ${DEPS} ${OBJ} @echo LINK $@ - @${CC} ${CFLAGS} -o ${TARGET}/$@.dll ${OBJ} ${EXTERN_OBJ} ${LDFLAGS} ${LIBS} + @${CC} ${CFLAGS} -o ../../${TARGET}/$@.dll ${OBJ} ${EXTERN_OBJ} ${LDFLAGS} ${LIBS}