2006-12-12 10:26:30 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
2006-12-14 03:55:15 +00:00
|
|
|
# Unix-style Makefile for rbutil
|
2006-12-12 10:26:30 +00:00
|
|
|
|
2006-12-12 10:44:59 +00:00
|
|
|
CXX=$(shell $(PREFIX)wx-config --cxx)
|
2007-02-21 20:27:14 +00:00
|
|
|
INC =
|
2007-02-22 00:36:36 +00:00
|
|
|
CFLAGS = -Wall -Wundef
|
2007-02-21 20:27:14 +00:00
|
|
|
OBJS=rbutil.o rbutilApp.o rbutilFrm.o wizard_pages.o bootloaders.o installlog.o ipodpatcher/ipodpatcher.o ipodpatcher/ipodio-posix.o irivertools.o md5sum.o
|
2006-12-12 10:44:59 +00:00
|
|
|
|
2007-02-17 02:24:37 +00:00
|
|
|
# Install into /usr/local by default
|
|
|
|
ifndef DESTDIR
|
|
|
|
DESTDIR=/usr/local
|
|
|
|
endif
|
2006-12-12 10:44:59 +00:00
|
|
|
|
2006-12-12 10:26:30 +00:00
|
|
|
# type "make WIN=1" for a Windows build using the Debian mingw cross-compiler
|
|
|
|
ifdef WIN
|
|
|
|
CROSS=i586-mingw32msvc-
|
|
|
|
WINDRES=i586-mingw32msvc-windres
|
|
|
|
EXT=.exe
|
|
|
|
PREFIX=/usr/i586-mingw32msvc/bin/
|
2006-12-12 10:44:59 +00:00
|
|
|
OBJS+=rbutil-rc.o
|
2006-12-12 10:26:30 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: rbutil$(EXT)
|
|
|
|
|
|
|
|
.cpp.o :
|
2007-02-22 00:36:36 +00:00
|
|
|
$(CXX) $(CFLAGS) $(INC) -c `$(PREFIX)wx-config --cxxflags` -o $@ $<
|
2007-02-17 02:24:37 +00:00
|
|
|
|
|
|
|
.c.o :
|
2007-02-22 00:36:36 +00:00
|
|
|
$(CC) $(CFLAGS) $(INC) -c `$(PREFIX)wx-config --cxxflags` -o $@ $<
|
2006-12-12 10:26:30 +00:00
|
|
|
|
|
|
|
rbutil-rc.o: rbutil-rc.rc
|
|
|
|
$(WINDRES) `$(PREFIX)wx-config --cxxflags` -O coff -F pe-i386 -o $@ $<
|
|
|
|
|
|
|
|
rbutil$(EXT): $(OBJS)
|
|
|
|
$(CXX) -o $@ $(OBJS) `$(PREFIX)wx-config --libs`
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f rbutil rbutil.exe $(OBJS) *~
|
2007-02-17 02:24:37 +00:00
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install -D rbutil$(EXT) $(DESTDIR)/bin/rbutil$(EXT)
|