diff options
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/chinachippatcher/Makefile | 2 | ||||
-rw-r--r-- | rbutil/ipodpatcher/Makefile | 2 | ||||
-rw-r--r-- | rbutil/libtools.make | 25 | ||||
-rw-r--r-- | rbutil/mkamsboot/Makefile | 4 | ||||
-rw-r--r-- | rbutil/mkmpioboot/Makefile | 2 | ||||
-rw-r--r-- | rbutil/mktccboot/Makefile | 2 | ||||
-rw-r--r-- | rbutil/mkzenboot/Makefile | 2 | ||||
-rw-r--r-- | rbutil/sansapatcher/Makefile | 2 |
8 files changed, 17 insertions, 24 deletions
diff --git a/rbutil/chinachippatcher/Makefile b/rbutil/chinachippatcher/Makefile index cdce19814d..c8defcb5c4 100644 --- a/rbutil/chinachippatcher/Makefile +++ b/rbutil/chinachippatcher/Makefile | |||
@@ -11,7 +11,7 @@ CFLAGS += -g -Wall | |||
11 | OUTPUT = chinachippatcher | 11 | OUTPUT = chinachippatcher |
12 | 12 | ||
13 | LIBSOURCES = chinachip.c | 13 | LIBSOURCES = chinachip.c |
14 | SOURCES = $(LIBSOURCES) main.c | 14 | SOURCES = main.c |
15 | 15 | ||
16 | include ../libtools.make | 16 | include ../libtools.make |
17 | 17 | ||
diff --git a/rbutil/ipodpatcher/Makefile b/rbutil/ipodpatcher/Makefile index 382423b4f2..4254995d22 100644 --- a/rbutil/ipodpatcher/Makefile +++ b/rbutil/ipodpatcher/Makefile | |||
@@ -32,7 +32,7 @@ LDOPTS_OSX = -framework CoreFoundation -framework IOKit | |||
32 | 32 | ||
33 | LIBSOURCES = ipodpatcher.c fat32format.c arc4.c \ | 33 | LIBSOURCES = ipodpatcher.c fat32format.c arc4.c \ |
34 | ipodio-posix.c ipodio-win32-scsi.c ipodio-win32.c | 34 | ipodio-posix.c ipodio-win32-scsi.c ipodio-win32.c |
35 | SOURCES = main.c $(BOOTSRC) $(LIBSOURCES) | 35 | SOURCES = main.c $(BOOTSRC) |
36 | ipodpatcher: SOURCES+= ipodio-posix.c | 36 | ipodpatcher: SOURCES+= ipodio-posix.c |
37 | 37 | ||
38 | OUTPUT = ipodpatcher | 38 | OUTPUT = ipodpatcher |
diff --git a/rbutil/libtools.make b/rbutil/libtools.make index 7a125f98ea..c107e69bfd 100644 --- a/rbutil/libtools.make +++ b/rbutil/libtools.make | |||
@@ -37,8 +37,6 @@ TARGET_DIR ?= $(abspath .)/ | |||
37 | NATIVECC ?= gcc | 37 | NATIVECC ?= gcc |
38 | CC ?= gcc | 38 | CC ?= gcc |
39 | CPPDEFINES := $(shell echo foo | $(CROSS)$(CC) -dM -E -) | 39 | CPPDEFINES := $(shell echo foo | $(CROSS)$(CC) -dM -E -) |
40 | # use POSIX/C99 printf on windows | ||
41 | CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 | ||
42 | 40 | ||
43 | BINARY = $(OUTPUT) | 41 | BINARY = $(OUTPUT) |
44 | # when building a Windows binary add the correct file suffix | 42 | # when building a Windows binary add the correct file suffix |
@@ -50,6 +48,8 @@ else | |||
50 | ifeq ($(findstring MINGW,$(CPPDEFINES)),MINGW) | 48 | ifeq ($(findstring MINGW,$(CPPDEFINES)),MINGW) |
51 | BINARY = $(OUTPUT).exe | 49 | BINARY = $(OUTPUT).exe |
52 | COMPILETARGET = mingw | 50 | COMPILETARGET = mingw |
51 | # use POSIX/C99 printf on windows | ||
52 | CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 | ||
53 | else | 53 | else |
54 | ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) | 54 | ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) |
55 | COMPILETARGET = darwin | 55 | COMPILETARGET = darwin |
@@ -79,16 +79,9 @@ CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 | |||
79 | NATIVECC = gcc-4.0 | 79 | NATIVECC = gcc-4.0 |
80 | endif | 80 | endif |
81 | endif | 81 | endif |
82 | WINDRES = windres | ||
83 | 82 | ||
84 | BUILD_DIR ?= $(TARGET_DIR)build$(COMPILETARGET) | 83 | BUILD_DIR ?= $(TARGET_DIR)build$(COMPILETARGET) |
85 | |||
86 | ifdef RBARCH | ||
87 | ARCHFLAGS += -arch $(RBARCH) | ||
88 | OBJDIR = $(abspath $(BUILD_DIR)/$(RBARCH))/ | ||
89 | else | ||
90 | OBJDIR = $(abspath $(BUILD_DIR))/ | 84 | OBJDIR = $(abspath $(BUILD_DIR))/ |
91 | endif | ||
92 | 85 | ||
93 | all: $(BINARY) | 86 | all: $(BINARY) |
94 | 87 | ||
@@ -103,20 +96,20 @@ DEPS = $(addprefix $(OBJDIR),$(subst .c,.d,$(notdir $(SOURCES) $(LIBSOURCES)))) | |||
103 | 96 | ||
104 | # additional link dependencies for the standalone executable | 97 | # additional link dependencies for the standalone executable |
105 | # extra dependencies: libucl | 98 | # extra dependencies: libucl |
106 | LIBUCL = libucl$(RBARCH).a | 99 | LIBUCL = libucl.a |
107 | $(LIBUCL): $(OBJDIR)$(LIBUCL) | 100 | $(LIBUCL): $(OBJDIR)$(LIBUCL) |
108 | 101 | ||
109 | $(OBJDIR)$(LIBUCL): | 102 | $(OBJDIR)$(LIBUCL): |
110 | $(SILENT)$(MAKE) -C $(TOP)/../tools/ucl/src TARGET_DIR=$(OBJDIR) $@ | 103 | $(SILENT)$(MAKE) -C $(TOP)/../tools/ucl/src TARGET_DIR=$(OBJDIR) $@ |
111 | 104 | ||
112 | # building the standalone executable | 105 | # building the standalone executable |
113 | $(BINARY): $(OBJS) $(EXTRADEPS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) | 106 | $(BINARY): $(OBJS) $(EXTRADEPS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) $(TARGET_DIR)lib$(OUTPUT).a |
114 | @echo LD $@ | 107 | @echo LD $@ |
115 | $(SILENT)$(call mkdir,$(dir $@)) | 108 | $(SILENT)$(call mkdir,$(dir $@)) |
116 | # EXTRADEPS need to be built into OBJDIR. | 109 | # EXTRADEPS need to be built into OBJDIR. |
117 | $(SILENT)$(CROSS)$(CC) $(ARCHFLAGS) $(CFLAGS) -o $(BINARY) \ | 110 | $(SILENT)$(CROSS)$(CC) $(ARCHFLAGS) $(CFLAGS) -o $(BINARY) \ |
118 | $(OBJS) $(addprefix $(OBJDIR),$(EXTRADEPS)) \ | 111 | $(OBJS) $(addprefix $(OBJDIR),$(EXTRADEPS)) \ |
119 | $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) $(LDOPTS) | 112 | $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) lib$(OUTPUT).a $(addprefix $(OBJDIR),$(EXTRADEPS)) $(LDOPTS) |
120 | 113 | ||
121 | # common rules | 114 | # common rules |
122 | $(OBJDIR)%.o: | 115 | $(OBJDIR)%.o: |
@@ -125,10 +118,10 @@ $(OBJDIR)%.o: | |||
125 | $(SILENT)$(CROSS)$(CC) $(ARCHFLAGS) $(CFLAGS) -c -o $@ $< | 118 | $(SILENT)$(CROSS)$(CC) $(ARCHFLAGS) $(CFLAGS) -c -o $@ $< |
126 | 119 | ||
127 | # lib rules | 120 | # lib rules |
128 | lib$(OUTPUT)$(RBARCH).a: $(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a | 121 | lib$(OUTPUT).a: $(TARGET_DIR)lib$(OUTPUT).a |
129 | lib$(OUTPUT)$(RBARCH): $(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a | 122 | lib$(OUTPUT): $(TARGET_DIR)lib$(OUTPUT).a |
130 | 123 | ||
131 | $(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a: $(LIBOBJS) \ | 124 | $(TARGET_DIR)lib$(OUTPUT).a: $(LIBOBJS) \ |
132 | $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) | 125 | $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) |
133 | # rules to build a DLL. Only works for W32 as target (i.e. MinGW toolchain) | 126 | # rules to build a DLL. Only works for W32 as target (i.e. MinGW toolchain) |
134 | dll: $(OUTPUT).dll | 127 | dll: $(OUTPUT).dll |
@@ -140,7 +133,7 @@ $(TARGET_DIR)$(OUTPUT).dll: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) | |||
140 | -Wl,--output-def,$(TARGET_DIR)$(OUTPUT).def | 133 | -Wl,--output-def,$(TARGET_DIR)$(OUTPUT).def |
141 | 134 | ||
142 | # create lib file from objects | 135 | # create lib file from objects |
143 | $(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) | 136 | $(TARGET_DIR)lib$(OUTPUT).a: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS)) |
144 | @echo AR $(notdir $@) | 137 | @echo AR $(notdir $@) |
145 | $(SILENT)$(call mkdir,$(dir $@)) | 138 | $(SILENT)$(call mkdir,$(dir $@)) |
146 | $(SILENT)$(call rm,$@) | 139 | $(SILENT)$(call rm,$@) |
diff --git a/rbutil/mkamsboot/Makefile b/rbutil/mkamsboot/Makefile index 67fe91e51d..7100bd9512 100644 --- a/rbutil/mkamsboot/Makefile +++ b/rbutil/mkamsboot/Makefile | |||
@@ -9,11 +9,11 @@ | |||
9 | CFLAGS += -I../../tools/ucl/include -Wall | 9 | CFLAGS += -I../../tools/ucl/include -Wall |
10 | 10 | ||
11 | OUTPUT = mkamsboot | 11 | OUTPUT = mkamsboot |
12 | LIBUCL = libucl$(RBARCH).a | 12 | LIBUCL = libucl.a |
13 | 13 | ||
14 | # inputs | 14 | # inputs |
15 | LIBSOURCES := dualboot.c md5.c mkamsboot.c | 15 | LIBSOURCES := dualboot.c md5.c mkamsboot.c |
16 | SOURCES := $(LIBSOURCES) main.c | 16 | SOURCES := main.c |
17 | # additional link dependencies for the standalone executable | 17 | # additional link dependencies for the standalone executable |
18 | EXTRADEPS := $(LIBUCL) | 18 | EXTRADEPS := $(LIBUCL) |
19 | 19 | ||
diff --git a/rbutil/mkmpioboot/Makefile b/rbutil/mkmpioboot/Makefile index 0a42e39217..8aa2d37028 100644 --- a/rbutil/mkmpioboot/Makefile +++ b/rbutil/mkmpioboot/Makefile | |||
@@ -13,7 +13,7 @@ OUTPUT = mkmpioboot | |||
13 | 13 | ||
14 | # inputs | 14 | # inputs |
15 | LIBSOURCES = mkmpioboot.c | 15 | LIBSOURCES = mkmpioboot.c |
16 | SOURCES = $(LIBSOURCES) main.c | 16 | SOURCES = main.c |
17 | EXTRADEPS = $(LIBUCL) | 17 | EXTRADEPS = $(LIBUCL) |
18 | 18 | ||
19 | include ../libtools.make | 19 | include ../libtools.make |
diff --git a/rbutil/mktccboot/Makefile b/rbutil/mktccboot/Makefile index df49c6977d..4943a8c568 100644 --- a/rbutil/mktccboot/Makefile +++ b/rbutil/mktccboot/Makefile | |||
@@ -16,7 +16,7 @@ OUTPUT = mktccboot | |||
16 | 16 | ||
17 | # inputs | 17 | # inputs |
18 | LIBSOURCES := mktccboot.c $(TOOLSDIR)telechips.c | 18 | LIBSOURCES := mktccboot.c $(TOOLSDIR)telechips.c |
19 | SOURCES := $(LIBSOURCES) main.c | 19 | SOURCES := main.c |
20 | EXTRADEPS := | 20 | EXTRADEPS := |
21 | 21 | ||
22 | include ../libtools.make | 22 | include ../libtools.make |
diff --git a/rbutil/mkzenboot/Makefile b/rbutil/mkzenboot/Makefile index 019b8a669f..ebc7a1670a 100644 --- a/rbutil/mkzenboot/Makefile +++ b/rbutil/mkzenboot/Makefile | |||
@@ -19,7 +19,7 @@ LIBSOURCES := dualboot.c mkzenboot.c md5.c utils.c \ | |||
19 | $(addprefix $(TOOLS_DIR),$(TOOLS_SOURCES)) | 19 | $(addprefix $(TOOLS_DIR),$(TOOLS_SOURCES)) |
20 | 20 | ||
21 | # inputs for binary only | 21 | # inputs for binary only |
22 | SOURCES := $(LIBSOURCES) main.c | 22 | SOURCES := main.c |
23 | # dependencies for binary | 23 | # dependencies for binary |
24 | EXTRADEPS := | 24 | EXTRADEPS := |
25 | 25 | ||
diff --git a/rbutil/sansapatcher/Makefile b/rbutil/sansapatcher/Makefile index 08af2bb6c8..85c36c6d14 100644 --- a/rbutil/sansapatcher/Makefile +++ b/rbutil/sansapatcher/Makefile | |||
@@ -12,7 +12,7 @@ OUTPUT = sansapatcher | |||
12 | 12 | ||
13 | # inputs | 13 | # inputs |
14 | LIBSOURCES := sansapatcher.c sansaio-posix.c sansaio-win32.c | 14 | LIBSOURCES := sansapatcher.c sansaio-posix.c sansaio-win32.c |
15 | SOURCES := $(LIBSOURCES) main.c | 15 | SOURCES := main.c |
16 | # additional link dependencies for the standalone executable | 16 | # additional link dependencies for the standalone executable |
17 | EXTRADEPS := | 17 | EXTRADEPS := |
18 | 18 | ||