added config option poly2bitmap
[swftools.git] / installer / Makefile
1 CC=/opt/xmingw/bin/i386-mingw32msvc-gcc -DWIN32
2 STRIP=/opt/xmingw/bin/i386-mingw32msvc-strip 
3 WINDRES=/opt/xmingw/bin/i386-mingw32msvc-windres
4
5 all: installer.exe
6
7 LIBS=-lgdi32 -lshlwapi -lcomctl32 -lshell32 -lole32
8
9 crnfiles.o: crnfiles.c
10         $(CC) -c crnfiles.c
11
12 depack.o: depack.c depack.h Makefile
13         $(CC) -c depack.c -o depack.o
14
15 archive.o: archive.c archive.c depack.h
16         $(CC) -c archive.c -o archive.o
17
18 os.o: ../lib/os.c ../lib/os.h
19         $(CC) -c ../lib/os.c -o os.o
20
21 installer.coff: installer.rc swftools.ico
22         $(WINDRES) installer.rc -O coff -F pe-i386 -o installer.coff
23
24 installer.exe: installer.c depack.o archive.o depack.h crnfiles.o os.o installer.coff Makefile
25         $(CC) installer.c depack.o archive.o crnfiles.o os.o installer.coff -o installer.exe $(LIBS)
26         $(STRIP) installer.exe
27         ./makegui installer.exe
28         upx -9 --best installer.exe 2>/dev/null || true
29
30 crnfiles.c: ../win32/*.exe
31         CWD=`pwd`
32         cd ../win32;../installer/mkarchive `find`
33         mv ../win32/crnfiles.c ./
34
35 clean:
36         rm -f installer.exe crnfiles.c *.o *.coff