3
#LDFLAGS = -shared -dll
5
#LIBS = user32.lib gdi32.lib shell32.lib
6
CC = i586-mingw32msvc-gcc
7
WINDRES = i586-mingw32msvc-windres
16
# -D_SZ_FILE_SIZE_32 - define it if you need only support for files smaller than 4 GB
17
# -D_LZMA_IN_CB -if defined it does not read the full archive to memory
18
# -D USE_WINDOWS_FUNCTIONS use windows functions instead of libc in unpack.c
21
# -Os optimize for size
22
# -GF read-only string constants
23
# -Gs disable stack checking calls
24
# -Gr fastcall calling convention
25
# -MD link against MSVCRT.DLL (also required by Python)
27
# -Wl,--file-alignment,512 pass option --file-alignement 512 to the linker
37
STRIP = i586-mingw32msvc-strip
57
$(7Z_DIR)/Archive/7z/*.c \
58
$(7Z_DIR)/Compress/Branch/BranchX86.c \
59
$(7Z_DIR)/Compress/Branch/BranchX86_2.c \
60
$(7Z_DIR)/Compress/Lzma/LzmaDecode.c \
63
all: pylauncher.exe header.exe pyrun.exe
65
header.exe:$(7Z_OBJS) unpack.o deletedir.o header.o str.o resources.o
66
$(CC) -o $@ $(LDFLAGS) $(LIBS) $^
69
pyrun.exe: deletedir.o pyrun.o str.o resources.o
70
$(CC) -o $@ $(LDFLAGS) $(LIBS) $^
73
pylauncher.exe: deletedir.o pylauncher.o str.o resources.o
74
$(CC) -o $@ $(LDFLAGS) $(LIBS) $^
77
$(7Z_OBJS): $(7Z_OBJS_SRC)
78
$(CC) $(DEBUGFLAG) $(CFLAGS) $^
80
resources.o: resources.rc
83
pylauncher.o: pylauncher.c
84
$(CC) $(DEBUGFLAG) $(CFLAGS) $^
87
$(CC) $(DEBUGFLAG) $(CFLAGS) $^
90
$(CC) $(DEBUGFLAG) $(CFLAGS) $^
92
deletedir.o: deletedir.c
93
$(CC) $(DEBUGFLAG) $(CFLAGS) $^
96
$(CC) $(DEBUGFLAG) $(CFLAGS) $^
99
$(CC) $(DEBUGFLAG) $(CFLAGS) $^
102
rm -f *.exe $(7Z_OBJS) *.d *.o