makefile.sdl
| r7077 | r7078 | |
| 1 | | ########################################################################### |
| 2 | | # |
| 3 | | # makefile |
| 4 | | # |
| 5 | | # Core makefile for building MAME and derivatives |
| 6 | | # |
| 7 | | # Copyright (c) Nicola Salmoria and the MAME Team. |
| 8 | | # Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | | # |
| 10 | | ########################################################################### |
| 11 | | |
| 12 | | |
| 13 | | |
| 14 | | ########################################################################### |
| 15 | | ################# BEGIN USER-CONFIGURABLE OPTIONS ##################### |
| 16 | | ########################################################################### |
| 17 | | |
| 18 | | |
| 19 | | #------------------------------------------------- |
| 20 | | # specify core target: mame, mess, etc. |
| 21 | | # specify subtarget: mame, mess, tiny, etc. |
| 22 | | # build rules will be included from |
| 23 | | # src/$(TARGET)/$(SUBTARGET).mak |
| 24 | | #------------------------------------------------- |
| 25 | | |
| 26 | | ifndef TARGET |
| 27 | | TARGET = mess |
| 28 | | endif |
| 29 | | |
| 30 | | ifndef SUBTARGET |
| 31 | | SUBTARGET = $(TARGET) |
| 32 | | endif |
| 33 | | |
| 34 | | |
| 35 | | |
| 36 | | #------------------------------------------------- |
| 37 | | # specify OSD layer: windows, sdl, etc. |
| 38 | | # build rules will be included from |
| 39 | | # src/osd/$(OSD)/$(OSD).mak |
| 40 | | #------------------------------------------------- |
| 41 | | |
| 42 | | ifndef OSD |
| 43 | | OSD = sdl |
| 44 | | endif |
| 45 | | |
| 46 | | ifndef CROSS_BUILD_OSD |
| 47 | | CROSS_BUILD_OSD = $(OSD) |
| 48 | | endif |
| 49 | | |
| 50 | | |
| 51 | | |
| 52 | | #------------------------------------------------- |
| 53 | | # specify OS target, which further differentiates |
| 54 | | # the underlying OS; supported values are: |
| 55 | | # win32, unix, macosx, os2 |
| 56 | | #------------------------------------------------- |
| 57 | | |
| 58 | | ifndef TARGETOS |
| 59 | | ifeq ($(OSD),windows) |
| 60 | | TARGETOS = win32 |
| 61 | | else |
| 62 | | TARGETOS = unix |
| 63 | | endif |
| 64 | | endif |
| 65 | | |
| 66 | | |
| 67 | | |
| 68 | | #------------------------------------------------- |
| 69 | | # configure name of final executable |
| 70 | | #------------------------------------------------- |
| 71 | | |
| 72 | | # uncomment and specify prefix to be added to the name |
| 73 | | # PREFIX = |
| 74 | | |
| 75 | | # uncomment and specify suffix to be added to the name |
| 76 | | # SUFFIX = |
| 77 | | |
| 78 | | |
| 79 | | |
| 80 | | #------------------------------------------------- |
| 81 | | # specify architecture-specific optimizations |
| 82 | | #------------------------------------------------- |
| 83 | | |
| 84 | | # uncomment and specify architecture-specific optimizations here |
| 85 | | # some examples: |
| 86 | | # optimize for I686: ARCHOPTS = -march=pentiumpro |
| 87 | | # optimize for Core 2: ARCHOPTS = -march=pentium-m -msse3 |
| 88 | | # optimize for G4: ARCHOPTS = -mcpu=G4 |
| 89 | | # note that we leave this commented by default so that you can |
| 90 | | # configure this in your environment and never have to think about it |
| 91 | | # ARCHOPTS = |
| 92 | | |
| 93 | | |
| 94 | | |
| 95 | | #------------------------------------------------- |
| 96 | | # specify program options; see each option below |
| 97 | | # for details |
| 98 | | #------------------------------------------------- |
| 99 | | |
| 100 | | # uncomment next line to build a debug version |
| 101 | | # DEBUG = 1 |
| 102 | | |
| 103 | | # uncomment next line to include the internal profiler |
| 104 | | # PROFILER = 1 |
| 105 | | |
| 106 | | # uncomment the force the universal DRC to always use the C backend |
| 107 | | # you may need to do this if your target architecture does not have |
| 108 | | # a native backend |
| 109 | | # FORCE_DRC_C_BACKEND = 1 |
| 110 | | |
| 111 | | # uncomment next line to build using unix-style libsdl on Mac OS X |
| 112 | | # (vs. the native framework port). Normal users should not enable this. |
| 113 | | # MACOSX_USE_LIBSDL = 1 |
| 114 | | |
| 115 | | |
| 116 | | #------------------------------------------------- |
| 117 | | # specify build options; see each option below |
| 118 | | # for details |
| 119 | | #------------------------------------------------- |
| 120 | | |
| 121 | | # uncomment next line if you are building for a 64-bit target |
| 122 | | # PTR64 = 1 |
| 123 | | |
| 124 | | # uncomment next line if you are building for a big-endian target |
| 125 | | # BIGENDIAN = 1 |
| 126 | | |
| 127 | | # uncomment next line to build expat as part of MAME build |
| 128 | | BUILD_EXPAT = 1 |
| 129 | | |
| 130 | | # uncomment next line to build zlib as part of MAME build |
| 131 | | BUILD_ZLIB = 1 |
| 132 | | |
| 133 | | # uncomment next line to include the symbols |
| 134 | | # SYMBOLS = 1 |
| 135 | | |
| 136 | | # uncomment next line to include profiling information from the compiler |
| 137 | | # PROFILE = 1 |
| 138 | | |
| 139 | | # uncomment next line to generate a link map for exception handling in windows |
| 140 | | # MAP = 1 |
| 141 | | |
| 142 | | # uncomment next line to generate verbose build information |
| 143 | | # VERBOSE = 1 |
| 144 | | |
| 145 | | # specify optimization level or leave commented to use the default |
| 146 | | # (default is OPTIMIZE = 3 normally, or OPTIMIZE = 0 with symbols) |
| 147 | | # OPTIMIZE = 3 |
| 148 | | |
| 149 | | # experimental: uncomment to compile everything as C++ for stricter type checking |
| 150 | | # CPP_COMPILE = 1 |
| 151 | | |
| 152 | | |
| 153 | | ########################################################################### |
| 154 | | ################## END USER-CONFIGURABLE OPTIONS ###################### |
| 155 | | ########################################################################### |
| 156 | | |
| 157 | | |
| 158 | | #------------------------------------------------- |
| 159 | | # sanity check the configuration |
| 160 | | #------------------------------------------------- |
| 161 | | |
| 162 | | # specify a default optimization level if none explicitly stated |
| 163 | | ifndef OPTIMIZE |
| 164 | | ifndef SYMBOLS |
| 165 | | OPTIMIZE = 3 |
| 166 | | else |
| 167 | | OPTIMIZE = 0 |
| 168 | | endif |
| 169 | | endif |
| 170 | | |
| 171 | | # profiler defaults to on for DEBUG builds |
| 172 | | ifdef DEBUG |
| 173 | | ifndef PROFILER |
| 174 | | PROFILER = 1 |
| 175 | | endif |
| 176 | | endif |
| 177 | | |
| 178 | | |
| 179 | | |
| 180 | | #------------------------------------------------- |
| 181 | | # platform-specific definitions |
| 182 | | #------------------------------------------------- |
| 183 | | |
| 184 | | # extension for executables |
| 185 | | EXE = |
| 186 | | |
| 187 | | ifeq ($(TARGETOS),win32) |
| 188 | | EXE = .exe |
| 189 | | endif |
| 190 | | ifeq ($(TARGETOS),os2) |
| 191 | | EXE = .exe |
| 192 | | endif |
| 193 | | |
| 194 | | ifndef BUILD_EXE |
| 195 | | BUILD_EXE = $(EXE) |
| 196 | | endif |
| 197 | | |
| 198 | | # compiler, linker and utilities |
| 199 | | AR = @ar |
| 200 | | CC = @gcc |
| 201 | | LD = @gcc |
| 202 | | MD = -mkdir$(EXE) |
| 203 | | RM = @rm -f |
| 204 | | |
| 205 | | |
| 206 | | |
| 207 | | #------------------------------------------------- |
| 208 | | # form the name of the executable |
| 209 | | #------------------------------------------------- |
| 210 | | |
| 211 | | # debug builds just get the 'd' suffix and nothing more |
| 212 | | ifdef DEBUG |
| 213 | | DEBUGSUFFIX = d |
| 214 | | endif |
| 215 | | |
| 216 | | # cpp builds get a 'pp' suffix |
| 217 | | ifdef CPP_COMPILE |
| 218 | | CPPSUFFIX = pp |
| 219 | | endif |
| 220 | | |
| 221 | | # the name is just 'target' if no subtarget; otherwise it is |
| 222 | | # the concatenation of the two (e.g., mametiny) |
| 223 | | ifeq ($(TARGET),$(SUBTARGET)) |
| 224 | | NAME = $(TARGET) |
| 225 | | else |
| 226 | | NAME = $(TARGET)$(SUBTARGET) |
| 227 | | endif |
| 228 | | |
| 229 | | # fullname is prefix+name+suffix+debugsuffix |
| 230 | | FULLNAME = $(PREFIX)$(NAME)$(CPPSUFFIX)$(SUFFIX)$(DEBUGSUFFIX) |
| 231 | | |
| 232 | | # add an EXE suffix to get the final emulator name |
| 233 | | EMULATOR = $(FULLNAME)$(EXE) |
| 234 | | |
| 235 | | |
| 236 | | |
| 237 | | #------------------------------------------------- |
| 238 | | # source and object locations |
| 239 | | #------------------------------------------------- |
| 240 | | |
| 241 | | # all sources are under the src/ directory |
| 242 | | SRC = src |
| 243 | | |
| 244 | | # build the targets in different object dirs, so they can co-exist |
| 245 | | OBJ = obj/$(OSD)/$(FULLNAME) |
| 246 | | |
| 247 | | |
| 248 | | |
| 249 | | #------------------------------------------------- |
| 250 | | # compile-time definitions |
| 251 | | #------------------------------------------------- |
| 252 | | |
| 253 | | # CR/LF setup: use both on win32/os2, CR only on everything else |
| 254 | | DEFS = -DCRLF=2 |
| 255 | | |
| 256 | | ifeq ($(TARGETOS),win32) |
| 257 | | DEFS = -DCRLF=3 |
| 258 | | endif |
| 259 | | ifeq ($(TARGETOS),os2) |
| 260 | | DEFS = -DCRLF=3 |
| 261 | | endif |
| 262 | | |
| 263 | | # map the INLINE to something digestible by GCC |
| 264 | | DEFS += -DINLINE="static __inline__" |
| 265 | | |
| 266 | | # define LSB_FIRST if we are a little-endian target |
| 267 | | ifndef BIGENDIAN |
| 268 | | DEFS += -DLSB_FIRST |
| 269 | | endif |
| 270 | | |
| 271 | | # define PTR64 if we are a 64-bit target |
| 272 | | ifdef PTR64 |
| 273 | | DEFS += -DPTR64 |
| 274 | | endif |
| 275 | | |
| 276 | | # define MAME_DEBUG if we are a debugging build |
| 277 | | ifdef DEBUG |
| 278 | | DEFS += -DMAME_DEBUG |
| 279 | | else |
| 280 | | DEFS += -DNDEBUG |
| 281 | | endif |
| 282 | | |
| 283 | | # define MAME_PROFILER if we are a profiling build |
| 284 | | ifdef PROFILER |
| 285 | | DEFS += -DMAME_PROFILER |
| 286 | | endif |
| 287 | | |
| 288 | | |
| 289 | | |
| 290 | | #------------------------------------------------- |
| 291 | | # compile flags |
| 292 | | # CCOMFLAGS are common flags |
| 293 | | # CONLYFLAGS are flags only used when compiling for C |
| 294 | | # CPPONLYFLAGS are flags only used when compiling for C++ |
| 295 | | #------------------------------------------------- |
| 296 | | |
| 297 | | # start with empties for everything |
| 298 | | CCOMFLAGS = |
| 299 | | CONLYFLAGS = |
| 300 | | CPPONLYFLAGS = |
| 301 | | |
| 302 | | # CFLAGS is defined based on C or C++ targets |
| 303 | | # (remember, expansion only happens when used, so doing it here is ok) |
| 304 | | ifdef CPP_COMPILE |
| 305 | | CFLAGS = $(CCOMFLAGS) $(CPPONLYFLAGS) |
| 306 | | else |
| 307 | | CFLAGS = $(CCOMFLAGS) $(CONLYFLAGS) |
| 308 | | endif |
| 309 | | |
| 310 | | # we compile C-only to C89 standard with GNU extensions |
| 311 | | # we compile C++ code to C++98 standard with GNU extensions |
| 312 | | CONLYFLAGS += -std=gnu89 |
| 313 | | CPPONLYFLAGS += -x c++ -std=gnu++98 |
| 314 | | |
| 315 | | # this speeds it up a bit by piping between the preprocessor/compiler/assembler |
| 316 | | CCOMFLAGS += -pipe |
| 317 | | |
| 318 | | # add -g if we need symbols, and ensure we have frame pointers |
| 319 | | ifdef SYMBOLS |
| 320 | | CCOMFLAGS += -g -fno-omit-frame-pointer |
| 321 | | endif |
| 322 | | |
| 323 | | # add -v if we need verbose build information |
| 324 | | ifdef VERBOSE |
| 325 | | CCOMFLAGS += -v |
| 326 | | endif |
| 327 | | |
| 328 | | # add profiling information for the compiler |
| 329 | | ifdef PROFILE |
| 330 | | CCOMFLAGS += -pg |
| 331 | | endif |
| 332 | | |
| 333 | | # add the optimization flag |
| 334 | | CCOMFLAGS += -O$(OPTIMIZE) |
| 335 | | |
| 336 | | # if we are optimizing, include optimization options |
| 337 | | # and make all errors into warnings |
| 338 | | ifneq ($(OPTIMIZE),0) |
| 339 | | ifneq ($(TARGETOS),os2) |
| 340 | | ifndef IA64 |
| 341 | | CCOMFLAGS += -Werror -fno-strict-aliasing $(ARCHOPTS) |
| 342 | | else |
| 343 | | endif |
| 344 | | else |
| 345 | | CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS) |
| 346 | | endif |
| 347 | | endif |
| 348 | | |
| 349 | | # add a basic set of warnings |
| 350 | | CCOMFLAGS += \ |
| 351 | | -Wall \ |
| 352 | | -Wcast-align \ |
| 353 | | -Wundef \ |
| 354 | | -Wformat-security \ |
| 355 | | -Wwrite-strings \ |
| 356 | | -Wno-sign-compare |
| 357 | | |
| 358 | | # warnings only applicable to C compiles |
| 359 | | CONLYFLAGS += \ |
| 360 | | -Wpointer-arith \ |
| 361 | | -Wbad-function-cast \ |
| 362 | | -Wstrict-prototypes |
| 363 | | |
| 364 | | # this warning is not supported on the os2 compilers |
| 365 | | ifneq ($(TARGETOS),os2) |
| 366 | | CONLYFLAGS += -Wdeclaration-after-statement |
| 367 | | endif |
| 368 | | |
| 369 | | |
| 370 | | #------------------------------------------------- |
| 371 | | # include paths |
| 372 | | #------------------------------------------------- |
| 373 | | |
| 374 | | # add core include paths |
| 375 | | CCOMFLAGS += \ |
| 376 | | -I$(SRC)/$(TARGET) \ |
| 377 | | -I$(SRC)/$(TARGET)/includes \ |
| 378 | | -I$(OBJ)/$(TARGET)/layout \ |
| 379 | | -I$(SRC)/emu \ |
| 380 | | -I$(OBJ)/emu \ |
| 381 | | -I$(OBJ)/emu/layout \ |
| 382 | | -I$(SRC)/lib/util \ |
| 383 | | -I$(SRC)/osd \ |
| 384 | | -I$(SRC)/osd/$(OSD) \ |
| 385 | | |
| 386 | | |
| 387 | | |
| 388 | | #------------------------------------------------- |
| 389 | | # linking flags |
| 390 | | #------------------------------------------------- |
| 391 | | |
| 392 | | # LDFLAGS are used generally; LDFLAGSEMULATOR are additional |
| 393 | | # flags only used when linking the core emulator |
| 394 | | LDFLAGS = |
| 395 | | ifneq ($(TARGETOS),macosx) |
| 396 | | ifneq ($(TARGETOS),os2) |
| 397 | | ifneq ($(TARGETOS),solaris) |
| 398 | | LDFLAGS = -Wl,--warn-common |
| 399 | | endif |
| 400 | | endif |
| 401 | | endif |
| 402 | | LDFLAGSEMULATOR = |
| 403 | | |
| 404 | | # add profiling information for the linker |
| 405 | | ifdef PROFILE |
| 406 | | LDFLAGS += -pg |
| 407 | | endif |
| 408 | | |
| 409 | | # strip symbols and other metadata in non-symbols and non profiling builds |
| 410 | | ifndef SYMBOLS |
| 411 | | ifndef PROFILE |
| 412 | | ifneq ($(TARGETOS),macosx) |
| 413 | | LDFLAGS += -s |
| 414 | | endif |
| 415 | | endif |
| 416 | | endif |
| 417 | | |
| 418 | | # output a map file (emulator only) |
| 419 | | ifdef MAP |
| 420 | | LDFLAGSEMULATOR += -Wl,-Map,$(FULLNAME).map |
| 421 | | endif |
| 422 | | |
| 423 | | |
| 424 | | |
| 425 | | #------------------------------------------------- |
| 426 | | # define the standard object directory; other |
| 427 | | # projects can add their object directories to |
| 428 | | # this variable |
| 429 | | #------------------------------------------------- |
| 430 | | |
| 431 | | OBJDIRS = $(OBJ) |
| 432 | | |
| 433 | | |
| 434 | | |
| 435 | | #------------------------------------------------- |
| 436 | | # define standard libarires for CPU and sounds |
| 437 | | #------------------------------------------------- |
| 438 | | |
| 439 | | LIBEMU = $(OBJ)/libemu.a |
| 440 | | LIBCPU = $(OBJ)/libcpu.a |
| 441 | | LIBDASM = $(OBJ)/libdasm.a |
| 442 | | LIBSOUND = $(OBJ)/libsound.a |
| 443 | | LIBUTIL = $(OBJ)/libutil.a |
| 444 | | LIBOCORE = $(OBJ)/libocore.a |
| 445 | | LIBOSD = $(OBJ)/libosd.a |
| 446 | | |
| 447 | | VERSIONOBJ = $(OBJ)/version.o |
| 448 | | |
| 449 | | |
| 450 | | |
| 451 | | #------------------------------------------------- |
| 452 | | # either build or link against the included |
| 453 | | # libraries |
| 454 | | #------------------------------------------------- |
| 455 | | |
| 456 | | # start with an empty set of libs |
| 457 | | LIBS = |
| 458 | | |
| 459 | | # add expat XML library |
| 460 | | ifdef BUILD_EXPAT |
| 461 | | CCOMFLAGS += -I$(SRC)/lib/expat |
| 462 | | EXPAT = $(OBJ)/libexpat.a |
| 463 | | else |
| 464 | | LIBS += -lexpat |
| 465 | | EXPAT = |
| 466 | | endif |
| 467 | | |
| 468 | | # add ZLIB compression library |
| 469 | | ifdef BUILD_ZLIB |
| 470 | | CCOMFLAGS += -I$(SRC)/lib/zlib |
| 471 | | ZLIB = $(OBJ)/libz.a |
| 472 | | else |
| 473 | | LIBS += -lz |
| 474 | | ZLIB = |
| 475 | | endif |
| 476 | | |
| 477 | | |
| 478 | | |
| 479 | | #------------------------------------------------- |
| 480 | | # 'all' target needs to go here, before the |
| 481 | | # include files which define additional targets |
| 482 | | #------------------------------------------------- |
| 483 | | |
| 484 | | all: maketree buildtools emulator tools |
| 485 | | |
| 486 | | |
| 487 | | |
| 488 | | |
| 489 | | #------------------------------------------------- |
| 490 | | # defines needed by multiple make files |
| 491 | | #------------------------------------------------- |
| 492 | | |
| 493 | | BUILDSRC = $(SRC)/build |
| 494 | | BUILDOBJ = $(OBJ)/build |
| 495 | | BUILDOUT = $(BUILDOBJ) |
| 496 | | |
| 497 | | |
| 498 | | #------------------------------------------------- |
| 499 | | # include the various .mak files |
| 500 | | #------------------------------------------------- |
| 501 | | |
| 502 | | # include OSD-specific rules first |
| 503 | | include $(SRC)/osd/$(OSD)/$(OSD).mak |
| 504 | | |
| 505 | | # then the various core pieces |
| 506 | | include $(SRC)/$(TARGET)/$(SUBTARGET).mak |
| 507 | | include $(SRC)/emu/emu.mak |
| 508 | | include $(SRC)/lib/lib.mak |
| 509 | | include $(SRC)/build/build.mak |
| 510 | | -include $(SRC)/osd/$(CROSS_BUILD_OSD)/build.mak |
| 511 | | include $(SRC)/tools/tools.mak |
| 512 | | |
| 513 | | # combine the various definitions to one |
| 514 | | CDEFS = $(DEFS) $(COREDEFS) $(SOUNDDEFS) |
| 515 | | |
| 516 | | |
| 517 | | |
| 518 | | #------------------------------------------------- |
| 519 | | # primary targets |
| 520 | | #------------------------------------------------- |
| 521 | | |
| 522 | | emulator: maketree $(BUILD) $(EMULATOR) |
| 523 | | |
| 524 | | buildtools: maketree $(BUILD) |
| 525 | | |
| 526 | | tools: maketree $(TOOLS) |
| 527 | | |
| 528 | | maketree: $(sort $(OBJDIRS)) |
| 529 | | |
| 530 | | clean: |
| 531 | | @echo Deleting object tree $(OBJ)... |
| 532 | | $(RM) -r $(OBJ) |
| 533 | | @echo Deleting $(EMULATOR)... |
| 534 | | $(RM) $(EMULATOR) |
| 535 | | @echo Deleting $(TOOLS)... |
| 536 | | $(RM) $(TOOLS) |
| 537 | | ifdef MAP |
| 538 | | @echo Deleting $(FULLNAME).map... |
| 539 | | $(RM) $(FULLNAME).map |
| 540 | | endif |
| 541 | | |
| 542 | | |
| 543 | | |
| 544 | | #------------------------------------------------- |
| 545 | | # directory targets |
| 546 | | #------------------------------------------------- |
| 547 | | |
| 548 | | $(sort $(OBJDIRS)): |
| 549 | | $(MD) -p $@ |
| 550 | | |
| 551 | | |
| 552 | | |
| 553 | | #------------------------------------------------- |
| 554 | | # executable targets and dependencies |
| 555 | | #------------------------------------------------- |
| 556 | | |
| 557 | | ifndef EXECUTABLE_DEFINED |
| 558 | | |
| 559 | | # always recompile the version string |
| 560 | | $(VERSIONOBJ): $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE) |
| 561 | | |
| 562 | | $(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBDASM) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE) |
| 563 | | @echo Linking $@... |
| 564 | | $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@ |
| 565 | | |
| 566 | | endif |
| 567 | | |
| 568 | | #------------------------------------------------- |
| 569 | | # generic rules |
| 570 | | #------------------------------------------------- |
| 571 | | |
| 572 | | $(OBJ)/%.o: $(SRC)/%.c | $(OSPREBUILD) |
| 573 | | @echo Compiling $<... |
| 574 | | $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@ |
| 575 | | |
| 576 | | $(OBJ)/%.pp: $(SRC)/%.c | $(OSPREBUILD) |
| 577 | | @echo Compiling $<... |
| 578 | | $(CC) $(CDEFS) $(CFLAGS) -E $< -o $@ |
| 579 | | |
| 580 | | $(OBJ)/%.s: $(SRC)/%.c | $(OSPREBUILD) |
| 581 | | @echo Compiling $<... |
| 582 | | $(CC) $(CDEFS) $(CFLAGS) -S $< -o $@ |
| 583 | | |
| 584 | | $(OBJ)/%.lh: $(SRC)/%.lay $(FILE2STR) |
| 585 | | @echo Converting $<... |
| 586 | | @$(FILE2STR) $< $@ layout_$(basename $(notdir $<)) |
| 587 | | |
| 588 | | $(OBJ)/%.fh: $(SRC)/%.png $(PNG2BDC) $(FILE2STR) |
| 589 | | @echo Converting $<... |
| 590 | | @$(PNG2BDC) $< $(OBJ)/temp.bdc |
| 591 | | @$(FILE2STR) $(OBJ)/temp.bdc $@ font_$(basename $(notdir $<)) UINT8 |
| 592 | | |
| 593 | | $(OBJ)/%.a: |
| 594 | | @echo Archiving $@... |
| 595 | | $(RM) $@ |
| 596 | | $(AR) -cr $@ $^ |
| 597 | | |
| 598 | | ifeq ($(TARGETOS),macosx) |
| 599 | | $(OBJ)/%.o: $(SRC)/%.m | $(OSPREBUILD) |
| 600 | | @echo Objective-C compiling $<... |
| 601 | | $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@ |
| 602 | | endif |