2005-04-25 21:28:46 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
2005-07-09 12:01:18 +00:00
|
|
|
#value for crosscompiling on linux
|
2005-04-25 21:28:46 +00:00
|
|
|
PREFIX=i586-mingw32msvc-
|
|
|
|
|
2005-07-09 12:01:18 +00:00
|
|
|
#value for compiling on cygwin
|
|
|
|
#PREFIX=
|
|
|
|
|
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
|
2005-07-09 12:01:18 +00:00
|
|
|
|
2005-07-22 09:58:47 +00:00
|
|
|
ifndef VERSION
|
|
|
|
VERSION=$(shell date +%y%m%d-%H%M)
|
|
|
|
endif
|
|
|
|
|
2005-07-09 12:01:18 +00:00
|
|
|
#values for crosscompiling on linux
|
2005-07-22 09:58:47 +00:00
|
|
|
CFLAGS = -DAPPSVERSION=\"$(VERSION)\" -I. -Os -s -fomit-frame-pointer
|
2005-04-25 21:28:46 +00:00
|
|
|
LDFLAGS = -lmingw32 -mwindows -s
|
|
|
|
|
2005-07-09 12:01:18 +00:00
|
|
|
#values for compiling on cygwin
|
|
|
|
#CFLAGS = -I. -Os -s -fomit-frame-pointer -mno-cygwin -DNOCYGWIN
|
|
|
|
#LDFLAGS = -lmingw32 -mwindows -s -mno-cygwin
|
|
|
|
|
2005-04-25 21:28:46 +00:00
|
|
|
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-11-18 20:01:51 +00:00
|
|
|
resource.o: resource.rc bootloader-h100.bin bootloader-h120.bin bootloader-h300.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)
|