~wxl/usb-creator/usb-creator

« back to all changes in this revision

Viewing changes to tools/pylauncher/Makefile

  • Committer: Mathieu Trudel-Lapierre
  • Date: 2015-12-11 17:37:20 UTC
  • mfrom: (472.1.46 usb-creator)
  • Revision ID: mathieu.trudel-lapierre@canonical.com-20151211173720-6wobakg37b2habnx
* Rework the whole imaging process for writing to devices:
  - Use an equivalent of dd to make an exact copy of the image to the device
  - This also breaks persistence.
* Update UI and frontend code to drop the persistence widgets.
* Drop Erase Disk widgets too.
* debian/usb-creator-common.postinst, debian/usb-creator-common.prerm:
  stop usb-creator-helper on package upgrades and removals.
  (LP: #1497569)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
export SHELL = sh
2
 
PROGRAM = pylauncher
3
 
#LDFLAGS = -shared -dll
4
 
#LIB = -lm -static
5
 
#LIBS = user32.lib gdi32.lib shell32.lib
6
 
CC = i586-mingw32msvc-gcc
7
 
WINDRES = i586-mingw32msvc-windres
8
 
CFLAGS = \
9
 
        -c \
10
 
        -Os \
11
 
        -Wall \
12
 
        -m32 \
13
 
        -march=i386 \
14
 
        -D_SZ_FILE_SIZE_32
15
 
 
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
19
 
# -DWINDOWS
20
 
# -c do not link
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)
26
 
# -W3 max warnings
27
 
# -Wl,--file-alignment,512  pass option --file-alignement 512 to the linker
28
 
#       -m32
29
 
# -march=i386
30
 
 
31
 
ifdef DEBUG
32
 
        DEBUGFLAG = -g
33
 
        STRIP = @echo
34
 
else
35
 
        DEBUGFLAG =
36
 
        LDFLAGS = -mwindows
37
 
        STRIP = i586-mingw32msvc-strip
38
 
endif
39
 
 
40
 
7Z_OBJS = \
41
 
        7zAlloc.o \
42
 
        7zBuffer.o \
43
 
        7zCrc.o \
44
 
        7zDecode.o \
45
 
        7zExtract.o \
46
 
        7zHeader.o \
47
 
        7zIn.o \
48
 
        7zItem.o \
49
 
        7zMethodID.o \
50
 
        LzmaDecode.o \
51
 
        BranchX86.o \
52
 
        BranchX86_2.o
53
 
 
54
 
7Z_DIR = ../7z/C
55
 
 
56
 
7Z_OBJS_SRC = \
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 \
61
 
        $(7Z_DIR)/7zCrc.c
62
 
 
63
 
all: pylauncher.exe header.exe pyrun.exe
64
 
 
65
 
header.exe:$(7Z_OBJS) unpack.o deletedir.o header.o str.o resources.o
66
 
        $(CC) -o $@ $(LDFLAGS) $(LIBS) $^
67
 
        $(STRIP) $@
68
 
 
69
 
pyrun.exe: deletedir.o pyrun.o str.o resources.o
70
 
        $(CC) -o $@ $(LDFLAGS) $(LIBS) $^
71
 
        $(STRIP) $@
72
 
 
73
 
pylauncher.exe: deletedir.o pylauncher.o str.o resources.o
74
 
        $(CC) -o $@ $(LDFLAGS) $(LIBS) $^
75
 
        $(STRIP) $@
76
 
 
77
 
$(7Z_OBJS): $(7Z_OBJS_SRC)
78
 
        $(CC) $(DEBUGFLAG) $(CFLAGS) $^
79
 
 
80
 
resources.o: resources.rc
81
 
        $(WINDRES) -o $@ $^
82
 
 
83
 
pylauncher.o: pylauncher.c
84
 
        $(CC) $(DEBUGFLAG) $(CFLAGS) $^
85
 
 
86
 
pyrun.o: pyrun.c
87
 
        $(CC) $(DEBUGFLAG) $(CFLAGS) $^
88
 
 
89
 
header.o: header.c
90
 
        $(CC) $(DEBUGFLAG) $(CFLAGS) $^
91
 
 
92
 
deletedir.o: deletedir.c
93
 
        $(CC) $(DEBUGFLAG) $(CFLAGS) $^
94
 
 
95
 
unpack.o: unpack.c
96
 
        $(CC) $(DEBUGFLAG) $(CFLAGS) $^
97
 
 
98
 
str.o: str.c
99
 
        $(CC) $(DEBUGFLAG) $(CFLAGS) $^
100
 
 
101
 
clean:
102
 
        rm -f *.exe $(7Z_OBJS) *.d *.o