Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 1 | # __________ __ ___. |
| 2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 6 | # \/ \/ \/ \/ \/ |
Björn Stenberg | a091d20 | 2008-11-25 19:54:23 +0000 | [diff] [blame] | 7 | # $Id$ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 8 | # |
| 9 | |
| 10 | include $(TOOLSDIR)/functions.make |
| 11 | |
Andree Buschmann | 5d849a9 | 2011-02-02 17:43:32 +0000 | [diff] [blame] | 12 | DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) $(TARGET) \ |
Rafaël Carré | 5d236b2 | 2010-05-27 09:41:46 +0000 | [diff] [blame] | 13 | -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" $(BUILDDATE) \ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 14 | $(EXTRA_DEFINES) # <-- -DSIMULATOR or not |
Tom Ross | 4fb5864 | 2009-03-02 06:13:18 +0000 | [diff] [blame] | 15 | INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 16 | |
| 17 | CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS) |
Jens Arnold | eef14e3 | 2010-03-20 08:53:27 +0000 | [diff] [blame] | 18 | PPCFLAGS = $(filter-out -g -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix |
Thomas Martitz | 0bf1bd1 | 2010-12-27 17:27:59 +0000 | [diff] [blame] | 19 | ASMFLAGS = -D__ASSEMBLER__ # work around gcc 3.4.x bug with -std=gnu99, only meant for .S files |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 20 | CORE_LDOPTS = $(GLOBAL_LDOPTS) # linker ops specifically for core build |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 21 | |
| 22 | TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \ |
| 23 | $(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \ |
Maurus Cuelenaere | 1920462 | 2010-02-16 21:55:42 +0000 | [diff] [blame] | 24 | $(TOOLSDIR)/uclpack $(TOOLSDIR)/mkboot $(TOOLSDIR)/iaudio_bl_flash.c \ |
Frank Gevaerts | 36d98fa | 2011-03-09 21:50:43 +0000 | [diff] [blame] | 25 | $(TOOLSDIR)/iaudio_bl_flash.h |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 26 | |
Jens Arnold | 266dc52 | 2012-05-18 23:24:57 +0200 | [diff] [blame] | 27 | ifeq ($(MODELNAME),archosplayer) |
| 28 | TOOLS += $(TOOLSDIR)/player_unifont |
| 29 | endif |
Thomas Martitz | 7ed1a5f | 2009-04-12 01:28:33 +0000 | [diff] [blame] | 30 | |
| 31 | ifeq (,$(PREFIX)) |
Thomas Martitz | 9c0b247 | 2010-08-01 16:15:27 +0000 | [diff] [blame] | 32 | ifdef APP_TYPE |
Thomas Martitz | 7ed1a5f | 2009-04-12 01:28:33 +0000 | [diff] [blame] | 33 | # for sims, set simdisk/ as default |
Thomas Martitz | 9c0b247 | 2010-08-01 16:15:27 +0000 | [diff] [blame] | 34 | ifeq ($(APP_TYPE),sdl-sim) |
| 35 | RBPREFIX = simdisk |
| 36 | else ifeq ($(APP_TYPE),sdl-app) |
| 37 | RBPREFIX = /usr/local |
| 38 | endif |
| 39 | |
| 40 | INSTALL = --install="$(RBPREFIX)" |
Thomas Martitz | 7ed1a5f | 2009-04-12 01:28:33 +0000 | [diff] [blame] | 41 | else |
| 42 | # /dev/null as magic to tell it wasn't set, error out later in buildzip.pl |
| 43 | INSTALL = --install=/dev/null |
| 44 | endif |
| 45 | else |
Thomas Martitz | 9c0b247 | 2010-08-01 16:15:27 +0000 | [diff] [blame] | 46 | RBPREFIX = $(PREFIX) |
| 47 | INSTALL = --install="$(RBPREFIX)" |
Thomas Martitz | 7ed1a5f | 2009-04-12 01:28:33 +0000 | [diff] [blame] | 48 | endif |
| 49 | |
Björn Stenberg | 8a7c4af | 2008-11-21 13:21:25 +0000 | [diff] [blame] | 50 | RBINFO = $(BUILDDIR)/rockbox-info.txt |
| 51 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 52 | # list suffixes to be understood by $* |
| 53 | .SUFFIXES: .rock .codec .map .elf .c .S .o .bmp .a |
| 54 | |
| 55 | .PHONY: all clean tags zip tools manual bin build info langs |
| 56 | |
Jens Arnold | 08f51a5 | 2009-03-10 19:06:14 +0000 | [diff] [blame] | 57 | ifeq (,$(filter clean veryclean reconf tags voice voicetools manual manual-pdf manual-html manual-zhtml manual-txt manual-ztxt manual-zip help fontzip ,$(MAKECMDGOALS))) |
Björn Stenberg | 34332cf | 2008-11-26 23:21:30 +0000 | [diff] [blame] | 58 | # none of the above |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 59 | DEPFILE = $(BUILDDIR)/make.dep |
| 60 | |
Björn Stenberg | 34332cf | 2008-11-26 23:21:30 +0000 | [diff] [blame] | 61 | endif |
| 62 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 63 | all: $(DEPFILE) build |
| 64 | |
Thomas Martitz | f269aa0 | 2012-03-26 22:24:57 +0200 | [diff] [blame] | 65 | # Subdir makefiles. their primary purpose is to populate SRC, OTHER_SRC, |
Björn Stenberg | 1501df0 | 2013-01-24 16:01:28 +0100 | [diff] [blame] | 66 | # ASMDEFS_SRC and CORE_LIBS. But they also define special dependencies and |
| 67 | # compile rules |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 68 | include $(TOOLSDIR)/tools.make |
Björn Stenberg | ffaf246 | 2009-09-01 14:53:37 +0000 | [diff] [blame] | 69 | |
Frank Gevaerts | 215ac63 | 2012-03-27 01:22:51 +0200 | [diff] [blame] | 70 | ifeq (,$(findstring checkwps,$(APP_TYPE))) |
| 71 | ifeq (,$(findstring database,$(APP_TYPE))) |
| 72 | ifeq (,$(findstring warble,$(APP_TYPE))) |
Thomas Martitz | 83cb2e5 | 2012-03-27 00:16:09 +0200 | [diff] [blame] | 73 | include $(FIRMDIR)/firmware.make |
| 74 | include $(ROOTDIR)/apps/bitmaps/bitmaps.make |
Dominik Riebeling | 9623685 | 2013-03-13 21:40:04 +0100 | [diff] [blame] | 75 | ifeq (arch_arm,$(ARCH)) |
Amaury Pouly | 1d121e8 | 2017-02-23 11:33:19 +0100 | [diff] [blame] | 76 | # some targets don't use the unwarminder because they have the glibc backtrace |
| 77 | ifeq (,$(filter sonynwz,$(APP_TYPE))) |
| 78 | include $(ROOTDIR)/lib/unwarminder/unwarminder.make |
| 79 | endif |
Dominik Riebeling | 9623685 | 2013-03-13 21:40:04 +0100 | [diff] [blame] | 80 | endif |
Björn Stenberg | 1501df0 | 2013-01-24 16:01:28 +0100 | [diff] [blame] | 81 | ifeq (,$(findstring bootloader,$(APPSDIR))) |
Thomas Martitz | 83cb2e5 | 2012-03-27 00:16:09 +0200 | [diff] [blame] | 82 | include $(ROOTDIR)/lib/skin_parser/skin_parser.make |
Thomas Martitz | c56950e | 2012-03-27 16:27:02 +0200 | [diff] [blame] | 83 | include $(ROOTDIR)/lib/tlsf/libtlsf.make |
Thomas Martitz | 83cb2e5 | 2012-03-27 00:16:09 +0200 | [diff] [blame] | 84 | endif |
Thomas Martitz | 045c69c | 2012-03-26 23:55:02 +0200 | [diff] [blame] | 85 | endif |
Yoshihisa Uchida | ec39c05 | 2010-02-25 12:28:30 +0000 | [diff] [blame] | 86 | endif |
Björn Stenberg | ffaf246 | 2009-09-01 14:53:37 +0000 | [diff] [blame] | 87 | endif |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 88 | |
Thomas Martitz | cf333a6 | 2012-01-17 07:36:08 +0100 | [diff] [blame] | 89 | #included before codecs.make and plugins.make so they see them) |
Thomas Martitz | 46454ac | 2010-08-24 12:38:42 +0000 | [diff] [blame] | 90 | ifndef APP_TYPE |
| 91 | include $(ROOTDIR)/lib/libsetjmp/libsetjmp.make |
Thomas Martitz | 7b1a369 | 2012-03-28 22:57:13 +0200 | [diff] [blame] | 92 | ifeq (arch_arm,$(ARCH)) |
Thomas Martitz | cf333a6 | 2012-01-17 07:36:08 +0100 | [diff] [blame] | 93 | include $(ROOTDIR)/lib/arm_support/arm_support.make |
| 94 | endif |
Thomas Martitz | 46454ac | 2010-08-24 12:38:42 +0000 | [diff] [blame] | 95 | endif |
| 96 | |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 97 | ifeq (,$(findstring bootloader,$(APPSDIR))) |
| 98 | ifeq (,$(findstring checkwps,$(APP_TYPE))) |
| 99 | include $(ROOTDIR)/lib/fixedpoint/fixedpoint.make |
| 100 | endif |
| 101 | endif |
| 102 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 103 | ifneq (,$(findstring bootloader,$(APPSDIR))) |
Amaury Pouly | 1d121e8 | 2017-02-23 11:33:19 +0100 | [diff] [blame] | 104 | ifneq (,$(findstring sonynwz,$(APP_TYPE))) |
| 105 | include $(ROOTDIR)/firmware/target/hosted/sonynwz/sonynwz.make |
Marcin Bukat | d556809 | 2017-04-27 11:36:40 +0200 | [diff] [blame] | 106 | else ifneq (,$(findstring rocker,$(APP_TYPE))) |
| 107 | include $(ROOTDIR)/firmware/target/hosted/agptek/rocker.make |
Amaury Pouly | 1d121e8 | 2017-02-23 11:33:19 +0100 | [diff] [blame] | 108 | else |
| 109 | include $(APPSDIR)/bootloader.make |
| 110 | endif |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 111 | else ifneq (,$(findstring bootbox,$(APPSDIR))) |
| 112 | include $(APPSDIR)/bootbox.make |
Frank Gevaerts | 466a7c6 | 2012-03-03 19:37:40 +0100 | [diff] [blame] | 113 | else ifneq (,$(findstring checkwps,$(APP_TYPE))) |
Maurus Cuelenaere | 8bff564 | 2009-08-21 20:28:26 +0000 | [diff] [blame] | 114 | include $(APPSDIR)/checkwps.make |
Thomas Martitz | d5f4391 | 2012-03-26 23:57:20 +0200 | [diff] [blame] | 115 | include $(ROOTDIR)/lib/skin_parser/skin_parser.make |
Frank Gevaerts | 466a7c6 | 2012-03-03 19:37:40 +0100 | [diff] [blame] | 116 | else ifneq (,$(findstring database,$(APP_TYPE))) |
Frank Gevaerts | 6e11572 | 2009-10-07 16:54:15 +0000 | [diff] [blame] | 117 | include $(APPSDIR)/database.make |
Frank Gevaerts | 466a7c6 | 2012-03-03 19:37:40 +0100 | [diff] [blame] | 118 | else ifneq (,$(findstring warble,$(APP_TYPE))) |
| 119 | include $(ROOTDIR)/lib/rbcodec/test/warble.make |
Thomas Martitz | a8b3d50 | 2012-03-29 00:01:44 +0200 | [diff] [blame] | 120 | include $(ROOTDIR)/lib/tlsf/libtlsf.make |
Thomas Martitz | 83cb2e5 | 2012-03-27 00:16:09 +0200 | [diff] [blame] | 121 | include $(ROOTDIR)/lib/rbcodec/rbcodec.make |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 122 | else # core |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 123 | include $(APPSDIR)/apps.make |
| 124 | include $(APPSDIR)/lang/lang.make |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 125 | include $(ROOTDIR)/lib/rbcodec/rbcodec.make |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 126 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 127 | ifdef ENABLEDPLUGINS |
| 128 | include $(APPSDIR)/plugins/bitmaps/pluginbitmaps.make |
| 129 | include $(APPSDIR)/plugins/plugins.make |
| 130 | endif |
| 131 | |
Thomas Martitz | f8381d9 | 2010-09-02 00:24:40 +0000 | [diff] [blame] | 132 | ifneq (,$(findstring sdl,$(APP_TYPE))) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 133 | include $(ROOTDIR)/uisimulator/uisimulator.make |
| 134 | endif |
Thomas Martitz | f8381d9 | 2010-09-02 00:24:40 +0000 | [diff] [blame] | 135 | |
Thomas Martitz | 249bba0 | 2011-12-24 11:56:46 +0000 | [diff] [blame] | 136 | ifneq (,$(findstring ypr0,$(APP_TYPE))) |
Lorenzo Miori | 6059216 | 2013-02-23 16:59:49 +0100 | [diff] [blame] | 137 | include $(ROOTDIR)/firmware/target/hosted/samsungypr/ypr0/ypr0.make |
Thomas Martitz | 249bba0 | 2011-12-24 11:56:46 +0000 | [diff] [blame] | 138 | endif |
| 139 | |
Lorenzo Miori | e876f4d | 2013-09-10 22:48:34 +0200 | [diff] [blame] | 140 | ifneq (,$(findstring ypr1,$(APP_TYPE))) |
| 141 | include $(ROOTDIR)/firmware/target/hosted/samsungypr/ypr1/ypr1.make |
| 142 | endif |
| 143 | |
Amaury Pouly | 1d121e8 | 2017-02-23 11:33:19 +0100 | [diff] [blame] | 144 | ifneq (,$(findstring sonynwz,$(APP_TYPE))) |
| 145 | include $(ROOTDIR)/firmware/target/hosted/sonynwz/sonynwz.make |
| 146 | endif |
| 147 | |
Marcin Bukat | d556809 | 2017-04-27 11:36:40 +0200 | [diff] [blame] | 148 | ifneq (,$(findstring rocker,$(APP_TYPE))) |
| 149 | include $(ROOTDIR)/firmware/target/hosted/agptek/rocker.make |
| 150 | endif |
| 151 | |
Udo Schläpfer | dbabd0d | 2015-02-02 21:44:29 +0100 | [diff] [blame] | 152 | ifneq (,$(findstring android_ndk, $(APP_TYPE))) |
| 153 | include $(ROOTDIR)/firmware/target/hosted/ibasso/android_ndk.make |
| 154 | else |
| 155 | ifneq (,$(findstring android, $(APP_TYPE))) |
| 156 | include $(ROOTDIR)/android/android.make |
| 157 | endif |
Thomas Martitz | f8381d9 | 2010-09-02 00:24:40 +0000 | [diff] [blame] | 158 | endif |
Thomas Jarosch | 986a92f | 2011-06-09 20:58:03 +0000 | [diff] [blame] | 159 | |
| 160 | ifneq (,$(findstring pandora, $(MODELNAME))) |
| 161 | include $(ROOTDIR)/packaging/pandora/pandora.make |
| 162 | endif |
| 163 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 164 | endif # bootloader |
| 165 | |
Michael Sevakis | 95e23de | 2013-04-16 17:47:58 -0400 | [diff] [blame] | 166 | # One or more subdir makefiles requested --gc-sections? |
| 167 | ifdef CORE_GCSECTIONS |
| 168 | # Do not use '--gc-sections' when compiling sdl-sim |
| 169 | ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim) |
| 170 | CORE_LDOPTS += -Wl,--gc-sections |
| 171 | endif |
| 172 | endif # CORE_GCSECTIONS |
| 173 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 174 | OBJ := $(SRC:.c=.o) |
| 175 | OBJ := $(OBJ:.S=.o) |
| 176 | OBJ += $(BMP:.bmp=.o) |
Amaury Pouly | b959655 | 2017-05-12 19:50:56 +1000 | [diff] [blame] | 177 | OBJ := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(OBJ)) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 178 | |
Björn Stenberg | 8a7c4af | 2008-11-21 13:21:25 +0000 | [diff] [blame] | 179 | build: $(TOOLS) $(BUILDDIR)/$(BINARY) $(CODECS) $(ROCKS) $(ARCHOSROM) $(RBINFO) |
| 180 | |
| 181 | $(RBINFO): $(BUILDDIR)/$(BINARY) |
| 182 | $(SILENT)echo Creating $(@F) |
| 183 | $(SILENT)$(TOOLSDIR)/mkinfo.pl $@ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 184 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 185 | $(DEPFILE) dep: |
| 186 | $(call PRINTS,Generating dependencies) |
Rafaël Carré | 27c509f | 2010-08-21 18:07:12 +0000 | [diff] [blame] | 187 | $(call mkdepfile,$(DEPFILE)_,$(SRC)) |
| 188 | $(call mkdepfile,$(DEPFILE)_,$(OTHER_SRC:%.lua=)) |
| 189 | $(call mkdepfile,$(DEPFILE)_,$(ASMDEFS_SRC)) |
| 190 | $(call bmpdepfile,$(DEPFILE)_,$(BMP) $(PBMP)) |
Maurus Cuelenaere | e8da447 | 2009-02-04 20:59:27 +0000 | [diff] [blame] | 191 | @mv $(DEPFILE)_ $(DEPFILE) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 192 | |
Thomas Martitz | 64f4b87 | 2009-04-03 13:44:47 +0000 | [diff] [blame] | 193 | bin: $(DEPFILE) $(TOOLS) $(BUILDDIR)/$(BINARY) $(RBINFO) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 194 | rocks: $(DEPFILE) $(TOOLS) $(ROCKS) |
| 195 | codecs: $(DEPFILE) $(TOOLS) $(CODECS) |
Maurus Cuelenaere | cf31386 | 2009-03-11 16:13:46 +0000 | [diff] [blame] | 196 | tools: $(TOOLS) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 197 | |
| 198 | -include $(DEPFILE) |
| 199 | |
| 200 | veryclean: clean |
| 201 | $(SILENT)rm -rf $(TOOLS) |
| 202 | |
Thomas Martitz | a994401 | 2010-09-12 16:35:02 +0000 | [diff] [blame] | 203 | clean:: |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 204 | $(SILENT)echo Cleaning build directory |
Björn Stenberg | 046776c | 2008-11-22 23:34:24 +0000 | [diff] [blame] | 205 | $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \ |
Rafaël Carré | 1da9b71 | 2010-06-19 06:11:22 +0000 | [diff] [blame] | 206 | rockbox.tar.bz2 TAGS apps firmware tools comsim sim lang lib \ |
Björn Stenberg | 046776c | 2008-11-22 23:34:24 +0000 | [diff] [blame] | 207 | manual *.pdf *.a credits.raw rockbox.ipod bitmaps \ |
| 208 | pluginbitmaps UI256.bmp rockbox-full.zip html txt \ |
| 209 | rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids \ |
Tom Ross | 4fb5864 | 2009-03-02 06:13:18 +0000 | [diff] [blame] | 210 | *.wav *.mp3 *.voice $(CLEANOBJS) \ |
Björn Stenberg | 046776c | 2008-11-22 23:34:24 +0000 | [diff] [blame] | 211 | $(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin \ |
Jens Arnold | 89b4157 | 2008-11-28 22:22:47 +0000 | [diff] [blame] | 212 | make.dep rombox.elf rombox.map rombox.bin rombox.ucl romstart.txt \ |
Maurus Cuelenaere | 0b92c0f | 2011-03-11 15:45:49 +0000 | [diff] [blame] | 213 | $(BINARY) $(FLASHFILE) uisimulator bootloader flash $(BOOTLINK) \ |
Dominik Riebeling | fc68a0d | 2011-05-29 18:44:42 +0000 | [diff] [blame] | 214 | rockbox.apk |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 215 | |
| 216 | #### linking the binaries: #### |
| 217 | |
| 218 | .SECONDEXPANSION: |
| 219 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 220 | ifeq (,$(findstring bootloader,$(APPSDIR))) |
| 221 | # not bootloader |
| 222 | |
Björn Stenberg | 6b96270 | 2008-11-21 15:27:16 +0000 | [diff] [blame] | 223 | OBJ += $(LANG_O) |
| 224 | |
Thomas Martitz | 57613ea | 2010-07-10 13:49:49 +0000 | [diff] [blame] | 225 | ifndef APP_TYPE |
Björn Stenberg | 6b96270 | 2008-11-21 15:27:16 +0000 | [diff] [blame] | 226 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 227 | ## target build |
Rafaël Carré | a9e2a71 | 2010-01-24 15:32:23 +0000 | [diff] [blame] | 228 | CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h |
Marcin Bukat | a02f863 | 2014-01-10 16:12:38 +0100 | [diff] [blame] | 229 | ifeq ($(wildcard $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/app.lds),) |
| 230 | RAMLDS := $(FIRMDIR)/target/$(CPU)/app.lds |
| 231 | else |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 232 | RAMLDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/app.lds |
Marcin Bukat | a02f863 | 2014-01-10 16:12:38 +0100 | [diff] [blame] | 233 | endif |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 234 | LINKRAM := $(BUILDDIR)/ram.link |
| 235 | ROMLDS := $(FIRMDIR)/rom.lds |
| 236 | LINKROM := $(BUILDDIR)/rom.link |
| 237 | |
Rafaël Carré | a9e2a71 | 2010-01-24 15:32:23 +0000 | [diff] [blame] | 238 | $(LINKRAM): $(RAMLDS) $(CONFIGFILE) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 239 | $(call PRINTS,PP $(@F)) |
| 240 | $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) |
| 241 | |
| 242 | $(LINKROM): $(ROMLDS) |
| 243 | $(call PRINTS,PP $(@F)) |
| 244 | $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) |
| 245 | |
Dominik Riebeling | 736c378 | 2013-05-04 22:16:08 +0200 | [diff] [blame] | 246 | # Note: make sure -Wl,--gc-sections comes before -T in the linker options. |
| 247 | # Having the latter first caused crashes on (at least) mini2g. |
Thomas Martitz | f269aa0 | 2012-03-26 22:24:57 +0200 | [diff] [blame] | 248 | $(BUILDDIR)/rockbox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKRAM) |
Björn Stenberg | a3864b0 | 2008-11-20 15:04:30 +0000 | [diff] [blame] | 249 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ |
| 250 | -L$(BUILDDIR)/firmware -lfirmware \ |
Sean Bartell | f40bfc9 | 2011-06-25 21:32:25 -0400 | [diff] [blame] | 251 | -L$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \ |
Thomas Martitz | f269aa0 | 2012-03-26 22:24:57 +0200 | [diff] [blame] | 252 | -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \ |
Dominik Riebeling | 736c378 | 2013-05-04 22:16:08 +0200 | [diff] [blame] | 253 | -lgcc $(CORE_LDOPTS) -T$(LINKRAM) \ |
| 254 | -Wl,-Map,$(BUILDDIR)/rockbox.map |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 255 | |
Thomas Martitz | f269aa0 | 2012-03-26 22:24:57 +0200 | [diff] [blame] | 256 | $(BUILDDIR)/rombox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKROM) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 257 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ |
Thomas Martitz | cf333a6 | 2012-01-17 07:36:08 +0100 | [diff] [blame] | 258 | -L$(BUILDDIR)/firmware -lfirmware \ |
Sean Bartell | f40bfc9 | 2011-06-25 21:32:25 -0400 | [diff] [blame] | 259 | -L$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \ |
Thomas Martitz | f269aa0 | 2012-03-26 22:24:57 +0200 | [diff] [blame] | 260 | -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \ |
Dominik Riebeling | 736c378 | 2013-05-04 22:16:08 +0200 | [diff] [blame] | 261 | -lgcc $(CORE_LDOPTS) -T$(LINKROM) \ |
| 262 | -Wl,-Map,$(BUILDDIR)/rombox.map |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 263 | |
| 264 | $(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf |
Thomas Martitz | 4b56ee0 | 2012-04-04 21:43:22 +0200 | [diff] [blame] | 265 | $(call PRINTS,OC $(@F))$(call objcopy,$<,$@) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 266 | |
| 267 | $(BUILDDIR)/rombox.bin : $(BUILDDIR)/rombox.elf |
Thomas Martitz | 4b56ee0 | 2012-04-04 21:43:22 +0200 | [diff] [blame] | 268 | $(call PRINTS,OC $(@F))$(call objcopy,$<,$@) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 269 | |
| 270 | # |
| 271 | # If there's a flashfile defined for this target (rockbox.ucl for Archos |
| 272 | # models) Then check if the mkfirmware script fails, as then it is (likely) |
| 273 | # because the image is too big and we need to create a compressed image |
| 274 | # instead. |
| 275 | # |
| 276 | $(BUILDDIR)/$(BINARY) : $(BUILDDIR)/rockbox.bin $(FLASHFILE) |
| 277 | $(call PRINTS,SCRAMBLE $(notdir $@))($(MKFIRMWARE) $< $@; \ |
| 278 | stat=$$?; \ |
| 279 | if test -n "$(FLASHFILE)"; then \ |
| 280 | if test "$$stat" -ne 0; then \ |
| 281 | echo "Image too big, making a compressed version!"; \ |
| 282 | $(MAKE) -C $(FIRMDIR)/decompressor OBJDIR=$(BUILDDIR)/firmware/decompressor; \ |
| 283 | $(MKFIRMWARE) $(BUILDDIR)/firmware/decompressor/compressed.bin $@; \ |
| 284 | fi \ |
| 285 | fi ) |
| 286 | |
| 287 | # archos |
| 288 | $(BUILDDIR)/rockbox.ucl: $(BUILDDIR)/rockbox.bin |
Daniel Stenberg | 2e6d604 | 2009-02-23 08:45:16 +0000 | [diff] [blame] | 289 | $(call PRINTS,UCLPACK $(@F))$(TOOLSDIR)/uclpack --best --2e -b1048576 $< $@ >/dev/null |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 290 | |
| 291 | MAXINFILE = $(BUILDDIR)/temp.txt |
| 292 | MAXOUTFILE = $(BUILDDIR)/romstart.txt |
| 293 | |
| 294 | $(BUILDDIR)/rombox.ucl: $(BUILDDIR)/rombox.bin $(MAXOUTFILE) |
| 295 | $(call PRINTS,UCLPACK $(@F))$(TOOLSDIR)/uclpack --none $< $@ >/dev/null; \ |
| 296 | perl $(TOOLSDIR)/romsizetest.pl `cat $(MAXOUTFILE)` $<; \ |
| 297 | if test $$? -ne 0; then \ |
| 298 | echo "removing UCL file again, making it a fake one"; \ |
| 299 | echo "fake" > $@; \ |
| 300 | fi |
| 301 | |
| 302 | $(MAXOUTFILE): |
| 303 | $(call PRINTS,Creating $(@F)) |
Rafaël Carré | 27c509f | 2010-08-21 18:07:12 +0000 | [diff] [blame] | 304 | $(SILENT)echo '#include "config.h"' > $(MAXINFILE) |
| 305 | $(SILENT)echo "ROM_START" >> $(MAXINFILE) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 306 | $(call preprocess2file,$(MAXINFILE),$(MAXOUTFILE)) |
| 307 | $(SILENT)rm $(MAXINFILE) |
| 308 | |
| 309 | # iriver |
| 310 | $(BUILDDIR)/rombox.iriver: $(BUILDDIR)/rombox.bin |
| 311 | $(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@ |
| 312 | |
Thomas Martitz | 57613ea | 2010-07-10 13:49:49 +0000 | [diff] [blame] | 313 | endif # !APP_TYPE |
Björn Stenberg | 6b96270 | 2008-11-21 15:27:16 +0000 | [diff] [blame] | 314 | endif # !bootloader |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 315 | |
| 316 | |
| 317 | voicetools: |
| 318 | $(SILENT)$(MAKE) -C $(TOOLSDIR) CC=$(HOSTCC) AR=$(HOSTAR) rbspeexenc voicefont wavtrim |
| 319 | |
| 320 | tags: |
| 321 | $(SILENT)rm -f TAGS |
| 322 | $(SILENT)etags -o $(BUILDDIR)/TAGS $(filter-out %.o,$(SRC) $(OTHER_SRC)) |
| 323 | |
| 324 | fontzip: |
Dave Chapman | 376c9f3 | 2011-02-27 11:37:39 +0000 | [diff] [blame] | 325 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 1 -o rockbox-fonts.zip $(TARGET) $(BINARY) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 326 | |
Björn Stenberg | c3cf8bc | 2011-06-06 22:00:44 +0000 | [diff] [blame] | 327 | zip: $(BUILDDIR)/rockbox.zip |
| 328 | |
Björn Stenberg | 35cd408 | 2011-06-22 14:14:49 +0000 | [diff] [blame] | 329 | ifdef NODEPS |
| 330 | $(BUILDDIR)/rockbox.zip: |
| 331 | else |
Björn Stenberg | c3cf8bc | 2011-06-06 22:00:44 +0000 | [diff] [blame] | 332 | $(BUILDDIR)/rockbox.zip: build |
Björn Stenberg | 35cd408 | 2011-06-22 14:14:49 +0000 | [diff] [blame] | 333 | endif |
Solomon Peachy | ebaddc6 | 2018-08-31 13:39:25 -0400 | [diff] [blame] | 334 | $(call PRINTS,ZIP $(notdir $@)) |
Dave Chapman | 376c9f3 | 2011-02-27 11:37:39 +0000 | [diff] [blame] | 335 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 336 | |
| 337 | mapzip: |
| 338 | $(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip |
| 339 | |
Alex Parker | 745406a | 2011-02-20 19:56:53 +0000 | [diff] [blame] | 340 | elfzip: |
| 341 | $(SILENT)find . -name "*.elf" | xargs zip rockbox-elfs.zip |
| 342 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 343 | fullzip: |
Dave Chapman | 376c9f3 | 2011-02-27 11:37:39 +0000 | [diff] [blame] | 344 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 -o rockbox-full.zip $(TARGET) $(BINARY) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 345 | |
| 346 | 7zip: |
Dave Chapman | 376c9f3 | 2011-02-27 11:37:39 +0000 | [diff] [blame] | 347 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 348 | |
| 349 | tar: |
| 350 | $(SILENT)rm -f rockbox.tar |
Dave Chapman | 376c9f3 | 2011-02-27 11:37:39 +0000 | [diff] [blame] | 351 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 352 | |
| 353 | bzip2: tar |
| 354 | $(SILENT)bzip2 -f9 rockbox.tar |
| 355 | |
| 356 | gzip: tar |
| 357 | $(SILENT)gzip -f9 rockbox.tar |
| 358 | |
| 359 | manual manual-pdf: |
| 360 | $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-pdf |
| 361 | manual-html: |
| 362 | $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-html |
| 363 | manual-zhtml: manual-zip |
| 364 | manual-txt: |
| 365 | $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-txt |
| 366 | manual-ztxt: |
| 367 | $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-txt-zip |
| 368 | manual-zip: |
| 369 | $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-zip |
| 370 | |
| 371 | ifdef TTS_ENGINE |
| 372 | |
Frank Gevaerts | 94aa0d7 | 2010-06-30 16:29:55 +0000 | [diff] [blame] | 373 | voice: voicetools $(BUILDDIR)/apps/features |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 374 | $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done ; \ |
| 375 | for lang in `echo $(VOICELANGUAGE) |sed "s/,/ /g"`; do $(TOOLSDIR)/voice.pl -V -l=$$lang -t=$(MODELNAME)$$feat -i=$(TARGET_ID) -e="$(ENCODER)" -E="$(ENC_OPTS)" -s=$(TTS_ENGINE) -S="$(TTS_OPTS)"; done \ |
| 376 | |
| 377 | endif |
| 378 | |
Antoine Cellerier | a448d8b | 2011-01-24 17:06:04 +0000 | [diff] [blame] | 379 | ifeq (,$(findstring android, $(APP_TYPE))) |
Thomas Martitz | 46137eb | 2014-02-22 23:17:16 +0100 | [diff] [blame] | 380 | |
Michael Sevakis | 7d1a47c | 2013-08-05 22:02:45 -0400 | [diff] [blame] | 381 | simext1: |
Thomas Martitz | 46137eb | 2014-02-22 23:17:16 +0100 | [diff] [blame] | 382 | $(SILENT)mkdir -p $@ |
| 383 | |
Rafaël Carré | 89eb19d | 2010-06-19 08:46:18 +0000 | [diff] [blame] | 384 | bininstall: $(BUILDDIR)/$(BINARY) |
Thomas Martitz | 9c0b247 | 2010-08-01 16:15:27 +0000 | [diff] [blame] | 385 | @echo "Installing your rockbox binary in your '$(RBPREFIX)' dir" |
| 386 | $(SILENT)cp $(BINARY) "$(RBPREFIX)/.rockbox/" |
Rafaël Carré | 53367ba | 2010-06-19 08:43:53 +0000 | [diff] [blame] | 387 | |
Michael Sevakis | 7d1a47c | 2013-08-05 22:02:45 -0400 | [diff] [blame] | 388 | install: simext1 |
Michael Chicoine | c6bcd91 | 2010-08-08 00:03:08 +0000 | [diff] [blame] | 389 | @echo "Installing your build in your '$(RBPREFIX)' dir" |
Dave Chapman | 376c9f3 | 2011-02-27 11:37:39 +0000 | [diff] [blame] | 390 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 0 $(TARGET) $(BINARY) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 391 | |
Michael Sevakis | 7d1a47c | 2013-08-05 22:02:45 -0400 | [diff] [blame] | 392 | fullinstall: simext1 |
Michael Chicoine | c6bcd91 | 2010-08-08 00:03:08 +0000 | [diff] [blame] | 393 | @echo "Installing a full setup in your '$(RBPREFIX)' dir" |
Dave Chapman | 376c9f3 | 2011-02-27 11:37:39 +0000 | [diff] [blame] | 394 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 395 | |
Michael Sevakis | 7d1a47c | 2013-08-05 22:02:45 -0400 | [diff] [blame] | 396 | symlinkinstall: simext1 |
Michael Stummvoll | 1f06ca4 | 2010-12-28 10:30:46 +0000 | [diff] [blame] | 397 | @echo "Installing a full setup with links in your '$(RBPREFIX)' dir" |
Dave Chapman | 376c9f3 | 2011-02-27 11:37:39 +0000 | [diff] [blame] | 398 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) -l |
Antoine Cellerier | a448d8b | 2011-01-24 17:06:04 +0000 | [diff] [blame] | 399 | endif |
Michael Stummvoll | 1f06ca4 | 2010-12-28 10:30:46 +0000 | [diff] [blame] | 400 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 401 | help: |
| 402 | @echo "A few helpful make targets" |
| 403 | @echo "" |
Michael Stummvoll | 1f06ca4 | 2010-12-28 10:30:46 +0000 | [diff] [blame] | 404 | @echo "all - builds a full Rockbox (default), including tools" |
| 405 | @echo "bin - builds only the Rockbox.<target name> file" |
| 406 | @echo "rocks - builds only plugins" |
| 407 | @echo "codecs - builds only codecs" |
| 408 | @echo "dep - regenerates make dependency database" |
| 409 | @echo "clean - cleans a build directory (not tools)" |
| 410 | @echo "veryclean - cleans the build and tools directories" |
| 411 | @echo "manual - builds a manual (pdf)" |
| 412 | @echo "manual-html - HTML manual" |
| 413 | @echo "manual-zip - HTML manual (zipped)" |
| 414 | @echo "manual-txt - txt manual" |
| 415 | @echo "fullzip - creates a rockbox.zip of your build with fonts" |
| 416 | @echo "zip - creates a rockbox.zip of your build (no fonts)" |
| 417 | @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)" |
| 418 | @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)" |
| 419 | @echo "7zip - creates a rockbox.7z of your build (no fonts)" |
| 420 | @echo "fontzip - creates rockbox-fonts.zip" |
| 421 | @echo "mapzip - creates rockbox-maps.zip with all .map files" |
Alex Parker | d0a0d02 | 2011-02-26 20:50:12 +0000 | [diff] [blame] | 422 | @echo "elfzip - creates rockbox-elfs.zip with all .elf files" |
Thomas Jarosch | 986a92f | 2011-06-09 20:58:03 +0000 | [diff] [blame] | 423 | @echo "pnd - creates rockbox.pnd archive (Pandora builds only)" |
Michael Stummvoll | 1f06ca4 | 2010-12-28 10:30:46 +0000 | [diff] [blame] | 424 | @echo "tools - builds the tools only" |
| 425 | @echo "voice - creates the voice clips (voice builds only)" |
| 426 | @echo "voicetools - builds the voice tools only" |
| 427 | @echo "install - installs your build (at PREFIX, defaults to simdisk/ for simulators (no fonts))" |
| 428 | @echo "fullinstall - installs your build (like install, but with fonts)" |
| 429 | @echo "symlinkinstall - like fullinstall, but with links instead of copying files. (Good for developing on simulator)" |
| 430 | @echo "reconf - rerun configure with the same selection" |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 431 | |
| 432 | ### general compile rules: |
| 433 | |
| 434 | # when source and object are in different locations (normal): |
| 435 | $(BUILDDIR)/%.o: $(ROOTDIR)/%.c |
| 436 | $(SILENT)mkdir -p $(dir $@) |
| 437 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ |
| 438 | |
| 439 | $(BUILDDIR)/%.o: $(ROOTDIR)/%.S |
| 440 | $(SILENT)mkdir -p $(dir $@) |
Thomas Martitz | 0bf1bd1 | 2010-12-27 17:27:59 +0000 | [diff] [blame] | 441 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) $(ASMFLAGS) -c $< -o $@ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 442 | |
Andrew Mahone | 668a769 | 2009-07-13 00:40:35 +0000 | [diff] [blame] | 443 | # generated definitions for use in .S files |
| 444 | $(BUILDDIR)/%_asmdefs.h: $(ROOTDIR)/%_asmdefs.c |
| 445 | $(call PRINTS,ASMDEFS $(@F)) |
| 446 | $(SILENT)mkdir -p $(dir $@) |
| 447 | $(call asmdefs2file,$<,$@) |
| 448 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 449 | # when source and object are both in BUILDDIR (generated code): |
| 450 | %.o: %.c |
| 451 | $(SILENT)mkdir -p $(dir $@) |
| 452 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ |
| 453 | |
| 454 | %.o: %.S |
| 455 | $(SILENT)mkdir -p $(dir $@) |
Thomas Martitz | 0bf1bd1 | 2010-12-27 17:27:59 +0000 | [diff] [blame] | 456 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) $(ASMFLAGS) -c $< -o $@ |
Daniel Stenberg | 4ef890e | 2009-01-09 23:15:27 +0000 | [diff] [blame] | 457 | |
Björn Stenberg | fc53725 | 2009-01-10 22:23:27 +0000 | [diff] [blame] | 458 | Makefile: $(TOOLSDIR)/configure |
Antoine Cellerier | ef0c9da | 2009-08-02 09:45:51 +0000 | [diff] [blame] | 459 | ifneq (reconf,$(MAKECMDGOALS)) |
Björn Stenberg | 6d871d5 | 2009-01-10 22:36:41 +0000 | [diff] [blame] | 460 | $(SILENT)echo "*** tools/configure is newer than Makefile. You should run 'make reconf'." |
Antoine Cellerier | ef0c9da | 2009-08-02 09:45:51 +0000 | [diff] [blame] | 461 | endif |
Björn Stenberg | 6d871d5 | 2009-01-10 22:36:41 +0000 | [diff] [blame] | 462 | |
| 463 | reconf: |
Thomas Martitz | 9c0b247 | 2010-08-01 16:15:27 +0000 | [diff] [blame] | 464 | $(SILENT$)$(TOOLSDIR)/configure $(CONFIGURE_OPTIONS) |