blob: a209be183e3ae6f46f6b91cb350bc8f7742078ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
#value for crosscompiling on linux
PREFIX=i586-mingw32msvc-
#value for compiling on cygwin
#PREFIX=
TARGET = fwpatchernu.exe
TARGETU = fwpatcher.exe
WINDRES = $(PREFIX)windres
CC = $(PREFIX)gcc
UNICODE = -DUNICODE -D_UNICODE
ifndef VERSION
VERSION=$(shell date +%y%m%d-%H%M)
endif
#values for crosscompiling on linux
CFLAGS = -DAPPSVERSION=\"$(VERSION)\" -I. -Os -s -fomit-frame-pointer
LDFLAGS = -lmingw32 -mwindows -s
#values for compiling on cygwin
#CFLAGS = -I. -Os -s -fomit-frame-pointer -mno-cygwin -DNOCYGWIN
#LDFLAGS = -lmingw32 -mwindows -s -mno-cygwin
OBJS= resource.o iriver.o main.o md5.o
OBJSU= resource.o iriveru.o mainu.o md5.o
all: $(TARGET) $(TARGETU)
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) -o $@
$(TARGETU): $(OBJSU)
$(CC) $(LDFLAGS) $(OBJSU) -o $@
resource.o: resource.rc bootloader-h100.bin bootloader-h120.bin bootloader-h300.bin rockbox.ico
$(WINDRES) -v $< $@
iriveru.o: iriver.c iriver.h
$(CC) $(CFLAGS) $(UNICODE) -c $< -o $@
iriver.o: iriver.c iriver.h
mainu.o: main.c
$(CC) $(CFLAGS) $(UNICODE) -c $< -o $@
main.o: main.c
md5.o: md5.c md5.h
clean:
rm -f $(OBJSU) $(OBJS) $(TARGETU) $(TARGET)
|