summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/Makefile30
-rw-r--r--rbutil/icons/Makefile39
2 files changed, 60 insertions, 9 deletions
diff --git a/rbutil/Makefile b/rbutil/Makefile
index 6fd248d753..e6791dccaf 100644
--- a/rbutil/Makefile
+++ b/rbutil/Makefile
@@ -10,9 +10,13 @@
10# Unix-style Makefile for rbutil 10# Unix-style Makefile for rbutil
11 11
12CXX=$(shell $(PREFIX)wx-config --version=2.8 --cxx) 12CXX=$(shell $(PREFIX)wx-config --version=2.8 --cxx)
13INC = 13INC = `$(PREFIX)wx-config --version=2.8 --cxxflags`
14LIBS = `$(PREFIX)wx-config --version=2.8 --libs`
14CFLAGS = -Wall -Wundef -DRBUTIL -D_LARGEFILE64_SOURCE 15CFLAGS = -Wall -Wundef -DRBUTIL -D_LARGEFILE64_SOURCE
15OBJS=rbutil.o rbutilApp.o rbutilFrm.o rbutilCtrls.o install_dialogs.o bootloaders.o installlog.o ipodpatcher/ipodpatcher.o ipodpatcher/ipodio-posix.o sansapatcher/sansapatcher.o sansapatcher/sansaio-posix.o irivertools.o md5sum.o autodetection.o 16OBJS=rbutil.o rbutilApp.o rbutilFrm.o rbutilCtrls.o install_dialogs.o bootloaders.o installlog.o ipodpatcher/ipodpatcher.o ipodpatcher/ipodio-posix.o sansapatcher/sansapatcher.o sansapatcher/sansaio-posix.o irivertools.o md5sum.o autodetection.o
17EXTRAOBJS = $(wildcard icons/*.o)
18
19SILENT = @
16 20
17# Install into /usr/local by default 21# Install into /usr/local by default
18ifndef DESTDIR 22ifndef DESTDIR
@@ -29,23 +33,31 @@ ifdef WIN
29endif 33endif
30 34
31.PHONY: all 35.PHONY: all
32all: rbutil$(EXT) 36all: icons rbutil$(EXT)
33 37
34.cpp.o : 38.cpp.o :
35 $(CXX) $(CFLAGS) $(INC) -c `$(PREFIX)wx-config --version=2.8 --cxxflags` -o $@ $< 39 $(SILENT) echo CXX $<
40 $(SILENT) $(CXX) $(CFLAGS) $(INC) -c -o $@ $<
36 41
37.c.o : 42.c.o :
38 $(CC) $(CFLAGS) $(INC) -c `$(PREFIX)wx-config --version=2.8 --cxxflags` -o $@ $< 43 $(SILENT) echo CC $<
44 $(SILENT) $(CC) $(CFLAGS) $(INC) -c -o $@ $<
39 45
40rbutil-rc.o: rbutil-rc.rc 46rbutil-rc.o: rbutil-rc.rc
41 $(WINDRES) `$(PREFIX)wx-config --version=2.8 --cxxflags` -O coff -F pe-i386 -o $@ $< 47 $(WINDRES) -O coff -F pe-i386 -o $@ $<
48
49rbutil$(EXT): $(OBJS)
50 $(SILENT) echo CXX $<
51 $(SILENT) $(CXX) -o $@ $(OBJS) $(EXTRAOBJS) $(LIBS)
42 52
43rbutil$(EXT): $(OBJS) 53.PHONY: icons
44 $(CXX) -o $@ $(OBJS) `$(PREFIX)wx-config --version=2.8 --libs` 54icons:
55 $(SILENT) $(MAKE) -C icons
45 56
46.PHONY: clean 57.PHONY: clean
47clean: 58clean:
48 rm -f rbutil rbutil.exe $(OBJS) *~ 59 rm -f rbutil rbutil.exe $(OBJS) *~
60 make -C icons clean
49 61
50.PHONY: install 62.PHONY: install
51 install -D rbutil$(EXT) $(DESTDIR)/bin/rbutil$(EXT) 63 install -D rbutil$(EXT) $(DESTDIR)/bin/rbutil$(EXT)
diff --git a/rbutil/icons/Makefile b/rbutil/icons/Makefile
new file mode 100644
index 0000000000..8eb630f427
--- /dev/null
+++ b/rbutil/icons/Makefile
@@ -0,0 +1,39 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9CC = gcc
10CXX = $(shell $(PREFIX)wx-config --version=2.8 --cxx)
11INC = `$(PREFIX)wx-config --version=2.8 --cxxflags`
12LIBS = `$(PREFIX)wx-config --version=2.8 --libs`
13
14CFLAGS = -Wall -Wundef -DRBUTIL -D_LARGEFILE64_SOURCE
15ICONS := $(wildcard *.png)
16HEADERS := $(subst .png,.h,$(ICONS))
17OBJS := $(subst .png,.o,$(ICONS))
18CXXSOURCES = $(subst .png,.cpp,$(ICONS))
19SILENT = @
20BIN2C = ./bin2c
21
22all: $(OBJS)
23
24
25bin2c: bin2c.c
26 $(SILENT) echo CC $<
27 $(SILENT) $(CC) -o $@ $<
28
29%.cpp: %.png bin2c
30 $(SILENT) echo BIN2C $<
31 $(SILENT) $(BIN2C) $<
32
33%.o: %.cpp
34 $(SILENT) echo CXX $<
35 $(SILENT) $(CXX) $(CFLAGS) $(INC) -c -o $@ $<
36
37clean:
38 $(SILENT) echo cleaning icons.
39 $(SILENT) rm -f bin2c $(OBJS) $(HEADERS) $(CXXSOURCES)