fixed compile error
[swftools.git] / installer / Makefile
blob94693160f4d543bc64c0d1d696c856af94500f9a
1 CC=i686-pc-mingw32-gcc -DWIN32 -Wno-trigraphs
2 STRIP=i686-pc-mingw32-strip
3 WINDRES=i686-pc-mingw32-windres
5 LICENSE=gpl.c
7 all: files1.exe uninstall.exe mkarchive
9 LIBS=-lgdi32 -lshlwapi -lcomctl32 -lshell32 -lole32 -luuid
11 files1.c: ../win32/*.exe mkarchive uninstall.exe
12 cp uninstall.exe ../win32/
13 CWD=`pwd`
14 cd ../win32;../installer/mkarchive `find`
15 mv ../win32/crnfiles.c ./files1.c
17 #files2.c: ../win32_gui/*.exe ../win32_gui/*.swf mkarchive uninstall.exe
18 # cp uninstall.exe ../win32_gui/
19 # CWD=`pwd`
20 # cd ../win32_gui;../installer/mkarchive `find`
21 # mv ../win32_gui/crnfiles.c ./files2.c
23 %.o: %.c
24 $(CC) -c $<
26 mkarchive: mkarchive.c
27 gcc mkarchive.c -o mkarchive -lz
29 crnfiles1.o: crnfiles1.c
30 #crnfiles2.o: crnfiles2.c
32 #depack.o: depack.c depack.h Makefile
33 # $(CC) -c depack.c -o depack.o
35 archive.o: archive.c archive.c
36 $(CC) -c archive.c -o archive.o
38 utils.o: utils.c utils.c
39 $(CC) -c utils.c -o utils.o
41 license.o: $(LICENSE)
42 $(CC) -c $< -o license.o
44 installer.o: installer.c installer.h archive.h
45 $(CC) -c installer.c -o installer.o
47 uninstaller.o: installer.c installer.h
48 $(CC) -DDEINSTALL -c installer.c -o uninstaller.o
50 installer.coff: installer.rc swftools.ico installer.h
51 $(WINDRES) installer.rc -O coff -F pe-i386 -o installer.coff
53 lzma/LzmaDecode.o: lzma/LzmaDecode.c lzma/LzmaDecode.h lzma/LzmaTypes.h
54 $(CC) -c lzma/LzmaDecode.c -o lzma/LzmaDecode.o
56 uninstall.exe: uninstaller.o utils.o installer.coff Makefile
57 $(CC) uninstaller.o utils.o installer.coff -o $@ $(LIBS)
58 $(STRIP) $@
59 ./makegui $@
60 #upx -9 --best $@ 2>/dev/null || true
62 %.exe: %.o installer.o license.o archive.o utils.o lzma/LzmaDecode.o installer.coff Makefile
63 $(CC) installer.o license.o utils.o archive.o lzma/LzmaDecode.o installer.coff $< -o $@ $(LIBS)
64 $(STRIP) $@
65 ./makegui $@
67 #installer.exe: installer.c depack.o archive.o depack.h crnfiles.o installer.coff Makefile
68 # $(CC) installer.c depack.o archive.o crnfiles.o installer.coff -o installer.exe $(LIBS)
69 # $(STRIP) installer.exe
70 # #./makegui installer.exe
71 # #upx -9 --best installer.exe 2>/dev/null || true
73 clean:
74 rm -f installer.exe files*exe crnfiles.c *.o *.coff