2005-04-25 21:28:46 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
|
|
|
PREFIX=i586-mingw32msvc-
|
|
|
|
|
2005-05-20 21:42:59 +00:00
|
|
|
TARGET = fwpatchernu.exe
|
|
|
|
TARGETU = fwpatcher.exe
|
2005-04-25 21:28:46 +00:00
|
|
|
|
|
|
|
WINDRES = $(PREFIX)windres
|
|
|
|
CC = $(PREFIX)gcc
|
|
|
|
|
2005-05-20 21:42:59 +00:00
|
|
|
UNICODE = -DUNICODE -D_UNICODE
|
|
|
|
CFLAGS = -I. -Os -s -fomit-frame-pointer
|
2005-04-25 21:28:46 +00:00
|
|
|
LDFLAGS = -lmingw32 -mwindows -s
|
|
|
|
|
|
|
|
OBJS= resource.o iriver.o main.o md5.o
|
2005-05-20 21:42:59 +00:00
|
|
|
OBJSU= resource.o iriveru.o mainu.o md5.o
|
2005-04-25 21:28:46 +00:00
|
|
|
|
2005-05-20 21:42:59 +00:00
|
|
|
all: $(TARGET) $(TARGETU)
|
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
2005-04-25 21:28:46 +00:00
|
|
|
$(CC) $(LDFLAGS) $(OBJS) -o $@
|
|
|
|
|
2005-05-20 21:42:59 +00:00
|
|
|
$(TARGETU): $(OBJSU)
|
|
|
|
$(CC) $(LDFLAGS) $(OBJSU) -o $@
|
|
|
|
|
2005-05-12 13:21:28 +00:00
|
|
|
resource.o: resource.rc bootloader.bin rockbox.ico
|
2005-04-25 21:28:46 +00:00
|
|
|
$(WINDRES) -v $< $@
|
|
|
|
|
2005-05-20 21:42:59 +00:00
|
|
|
iriveru.o: iriver.c iriver.h
|
|
|
|
$(CC) $(CFLAGS) $(UNICODE) -c $< -o $@
|
|
|
|
|
2005-04-25 21:28:46 +00:00
|
|
|
iriver.o: iriver.c iriver.h
|
|
|
|
|
2005-05-20 21:42:59 +00:00
|
|
|
mainu.o: main.c
|
|
|
|
$(CC) $(CFLAGS) $(UNICODE) -c $< -o $@
|
|
|
|
|
2005-04-25 21:28:46 +00:00
|
|
|
main.o: main.c
|
|
|
|
|
|
|
|
md5.o: md5.c md5.h
|
|
|
|
|
2005-05-20 21:42:59 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(OBJSU) $(OBJS) $(TARGETU) $(TARGET)
|