diff options
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/Makefile | 30 | ||||
-rw-r--r-- | rbutil/icons/Makefile | 39 |
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 | ||
12 | CXX=$(shell $(PREFIX)wx-config --version=2.8 --cxx) | 12 | CXX=$(shell $(PREFIX)wx-config --version=2.8 --cxx) |
13 | INC = | 13 | INC = `$(PREFIX)wx-config --version=2.8 --cxxflags` |
14 | LIBS = `$(PREFIX)wx-config --version=2.8 --libs` | ||
14 | CFLAGS = -Wall -Wundef -DRBUTIL -D_LARGEFILE64_SOURCE | 15 | CFLAGS = -Wall -Wundef -DRBUTIL -D_LARGEFILE64_SOURCE |
15 | OBJS=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 | 16 | OBJS=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 |
17 | EXTRAOBJS = $(wildcard icons/*.o) | ||
18 | |||
19 | SILENT = @ | ||
16 | 20 | ||
17 | # Install into /usr/local by default | 21 | # Install into /usr/local by default |
18 | ifndef DESTDIR | 22 | ifndef DESTDIR |
@@ -29,23 +33,31 @@ ifdef WIN | |||
29 | endif | 33 | endif |
30 | 34 | ||
31 | .PHONY: all | 35 | .PHONY: all |
32 | all: rbutil$(EXT) | 36 | all: 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 | ||
40 | rbutil-rc.o: rbutil-rc.rc | 46 | rbutil-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 | |||
49 | rbutil$(EXT): $(OBJS) | ||
50 | $(SILENT) echo CXX $< | ||
51 | $(SILENT) $(CXX) -o $@ $(OBJS) $(EXTRAOBJS) $(LIBS) | ||
42 | 52 | ||
43 | rbutil$(EXT): $(OBJS) | 53 | .PHONY: icons |
44 | $(CXX) -o $@ $(OBJS) `$(PREFIX)wx-config --version=2.8 --libs` | 54 | icons: |
55 | $(SILENT) $(MAKE) -C icons | ||
45 | 56 | ||
46 | .PHONY: clean | 57 | .PHONY: clean |
47 | clean: | 58 | clean: |
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 | # | ||
9 | CC = gcc | ||
10 | CXX = $(shell $(PREFIX)wx-config --version=2.8 --cxx) | ||
11 | INC = `$(PREFIX)wx-config --version=2.8 --cxxflags` | ||
12 | LIBS = `$(PREFIX)wx-config --version=2.8 --libs` | ||
13 | |||
14 | CFLAGS = -Wall -Wundef -DRBUTIL -D_LARGEFILE64_SOURCE | ||
15 | ICONS := $(wildcard *.png) | ||
16 | HEADERS := $(subst .png,.h,$(ICONS)) | ||
17 | OBJS := $(subst .png,.o,$(ICONS)) | ||
18 | CXXSOURCES = $(subst .png,.cpp,$(ICONS)) | ||
19 | SILENT = @ | ||
20 | BIN2C = ./bin2c | ||
21 | |||
22 | all: $(OBJS) | ||
23 | |||
24 | |||
25 | bin2c: 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 | |||
37 | clean: | ||
38 | $(SILENT) echo cleaning icons. | ||
39 | $(SILENT) rm -f bin2c $(OBJS) $(HEADERS) $(CXXSOURCES) | ||