Add dist script to Makefile
This commit is contained in:
parent
f245ec319f
commit
f9bb12d0ad
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
x86_64-pc-windows
|
||||
*.o
|
||||
*.dll
|
||||
original.cpp
|
||||
*.7z
|
||||
|
23
Makefile
23
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
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user