diff options
author | Dave Chapman <dave@dchapman.com> | 2006-12-12 10:26:30 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2006-12-12 10:26:30 +0000 |
commit | 018a10d7a276c212f6f6b223ea3af2645c8b6f43 (patch) | |
tree | 25f83fb606ac247945897e551961898ba90bc928 /rbutil/Makefile | |
parent | 2546906b89450e591e0a3aa64ed900287b5dbea1 (diff) |
First attempt at a standard Makefile for rbutil. It should be able to build both a native Unix version, or (make WIN=1) cross-compile a Windows version using the Debian mingw cross-compiler. Both builds currently fail, but I think the win32 problem is due to the old (2.5.0) version of wxWidgets I have installed for cross-compiling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11732 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/Makefile')
-rw-r--r-- | rbutil/Makefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/rbutil/Makefile b/rbutil/Makefile new file mode 100644 index 0000000000..9d7c04caf1 --- /dev/null +++ b/rbutil/Makefile @@ -0,0 +1,42 @@ +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# $Id$ +# + +# Unix-style Makefile for rbutil + + +# 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/ +endif + + +CC=$(CROSS)gcc +CXX=$(shell $(PREFIX)wx-config --cxx) +CFLAGS=-Wall $(INCLUDES) +LIBS=-lm +OBJS=main.o rbutil.o rbutilApp.o rbutilFrm.o wizard_pages.o rbutil-rc.o + +.PHONY: all +all: rbutil$(EXT) + +.cpp.o : + $(CXX) -c `$(PREFIX)wx-config --cxxflags` -o $@ $< + +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) *~ |