1 CC=/opt/xmingw/bin/i386-mingw32msvc-gcc -DWIN32 -Wno-trigraphs
2 STRIP=/opt/xmingw/bin/i386-mingw32msvc-strip
3 WINDRES=/opt/xmingw/bin/i386-mingw32msvc-windres
7 all: files1.exe files2.exe uninstall.exe mkarchive
9 LIBS=-lgdi32 -lshlwapi -lcomctl32 -lshell32 -lole32 -luuid
11 files1.c: ../win32/*.exe mkarchive
13 cd ../win32;../installer/mkarchive `find`
14 mv ../win32/crnfiles.c ./files1.c
16 files2.c: ../win32_gui/*.exe ../win32_gui/*.swf mkarchive
18 cd ../win32_gui;../installer/mkarchive `find`
19 mv ../win32_gui/crnfiles.c ./files2.c
24 mkarchive: mkarchive.c
25 gcc mkarchive.c -o mkarchive -lz
27 crnfiles1.o: crnfiles1.c
28 crnfiles2.o: crnfiles2.c
30 #depack.o: depack.c depack.h Makefile
31 # $(CC) -c depack.c -o depack.o
33 archive.o: archive.c archive.c
34 $(CC) -c archive.c -o archive.o
36 utils.o: utils.c utils.c
37 $(CC) -c utils.c -o utils.o
40 $(CC) -c $< -o license.o
42 installer.o: installer.c installer.h archive.h
43 $(CC) -c installer.c -o installer.o
45 uninstaller.o: installer.c installer.h
46 $(CC) -DDEINSTALL -c installer.c -o uninstaller.o
48 installer.coff: installer.rc swftools.ico installer.h
49 $(WINDRES) installer.rc -O coff -F pe-i386 -o installer.coff
51 lzma/LzmaDecode.o: lzma/LzmaDecode.c lzma/LzmaDecode.h lzma/LzmaTypes.h
52 $(CC) -c lzma/LzmaDecode.c -o lzma/LzmaDecode.o
54 uninstall.exe: uninstaller.o utils.o installer.coff Makefile
55 $(CC) uninstaller.o utils.o installer.coff -o $@ $(LIBS)
59 %.exe: %.o installer.o license.o archive.o utils.o lzma/LzmaDecode.o installer.coff Makefile
60 $(CC) installer.o license.o utils.o archive.o lzma/LzmaDecode.o installer.coff $< -o $@ $(LIBS)
63 #upx -9 --best $@ 2>/dev/null || true
65 #installer.exe: installer.c depack.o archive.o depack.h crnfiles.o installer.coff Makefile
66 # $(CC) installer.c depack.o archive.o crnfiles.o installer.coff -o installer.exe $(LIBS)
67 # $(STRIP) installer.exe
68 # #./makegui installer.exe
69 # #upx -9 --best installer.exe 2>/dev/null || true
72 rm -f installer.exe files*exe crnfiles.c *.o *.coff