2011-12-03 20:27:59 +00:00
|
|
|
# Makefile for FBA, for use with GNU make & GCC (MinGW)
|
|
|
|
#
|
|
|
|
# The first pass makes sure all intermediary targets are present. The second pass updates
|
|
|
|
# any targets, if necessary. (Intermediary) targets which have their own unique rules
|
|
|
|
# are generated as required.
|
|
|
|
|
|
|
|
unexport
|
|
|
|
|
|
|
|
#
|
|
|
|
# Flags. Uncomment any of these declarations to enable their function.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Check for changes in header files
|
2018-03-27 13:40:40 +00:00
|
|
|
DEPEND = 1
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Declare variables
|
|
|
|
#
|
|
|
|
|
|
|
|
# Specify the name of the executable file, without ".exe"
|
|
|
|
NAME = fba
|
2012-01-18 20:24:14 +00:00
|
|
|
COMPILENAME = 3
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
ifdef BUILD_X64_EXE
|
|
|
|
ifdef BUILD_A68K
|
|
|
|
undefine BUILD_A68K
|
|
|
|
endif
|
|
|
|
ifdef BUILD_X86_ASM
|
|
|
|
undefine BUILD_X86_ASM
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-04-18 09:32:07 +00:00
|
|
|
ifndef DEBUG
|
|
|
|
undefine BUILD_A68K
|
|
|
|
endif
|
|
|
|
|
2011-12-03 20:27:59 +00:00
|
|
|
ifndef CPUTYPE
|
|
|
|
CPUTYPE = i686
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef BUILD_X86_ASM
|
|
|
|
MMX = 1
|
|
|
|
else
|
|
|
|
MMX = 0
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef BUILD_X86_ASM
|
2012-01-18 20:24:14 +00:00
|
|
|
NAME := $(NAME)x
|
|
|
|
COMPILENAME := $(COMPILENAME)x
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
|
|
|
ifdef BUILD_X64_EXE
|
|
|
|
NAME = fba64
|
2012-01-18 20:24:14 +00:00
|
|
|
COMPILENAME = 6
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
|
|
|
ifdef DEBUG
|
|
|
|
NAME := $(NAME)d
|
2012-01-18 20:24:14 +00:00
|
|
|
COMPILENAME := $(COMPILENAME)d
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
|
|
|
ifdef SYMBOL
|
|
|
|
NAME := $(NAME)s
|
2012-01-18 20:24:14 +00:00
|
|
|
COMPILENAME := $(COMPILENAME)s
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
|
|
|
ifndef UNICODE
|
|
|
|
NAME := $(NAME)a
|
2012-01-18 20:24:14 +00:00
|
|
|
COMPILENAME := $(COMPILENAME)a
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CPUTYPE),i686)
|
|
|
|
ppro = ppro
|
|
|
|
else
|
|
|
|
NAME := $(NAME)$(CPUTYPE)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Specify paths/files
|
|
|
|
#
|
|
|
|
|
|
|
|
ifdef GCC345
|
2012-01-18 20:24:14 +00:00
|
|
|
objdir = obj/34/$(COMPILENAME)/
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
|
|
|
ifdef GCC452
|
2012-01-18 20:24:14 +00:00
|
|
|
objdir = obj/45/$(COMPILENAME)/
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
2012-11-16 20:52:52 +00:00
|
|
|
ifdef GCC471
|
|
|
|
objdir = obj/47/$(COMPILENAME)/
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
2015-09-17 13:53:20 +00:00
|
|
|
ifdef GCC510
|
|
|
|
objdir = obj/51/$(COMPILENAME)/
|
|
|
|
endif
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
srcdir = src/
|
|
|
|
|
2012-01-10 15:22:01 +00:00
|
|
|
include makefile.burn_rules
|
|
|
|
include makefile.burner_win32_rules
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
ifdef GCC345
|
2012-01-18 20:24:14 +00:00
|
|
|
incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)dep/generated -I$(srcdir)dep/mingw/include -I- -I$(srcdir)dep/mingw/include/directx9 -I$(srcdir)dep/mingw/include/xaudio2
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
|
|
|
ifdef GCC452
|
2012-01-18 20:24:14 +00:00
|
|
|
incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)dep/generated -I$(srcdir)dep/mingw/include -I$(srcdir)dep/mingw/include/directx9 -I$(srcdir)dep/mingw/include/xaudio2
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
2012-11-16 20:52:52 +00:00
|
|
|
ifdef GCC471
|
2012-01-18 20:24:14 +00:00
|
|
|
incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)dep/generated -I$(srcdir)dep/mingw/include -I$(srcdir)dep/mingw/include/directx9 -I$(srcdir)dep/mingw/include/xaudio2
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
2015-09-17 13:53:20 +00:00
|
|
|
ifdef GCC510
|
|
|
|
incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)dep/generated -I$(srcdir)dep/mingw/include -I$(srcdir)dep/mingw/include/directx9 -I$(srcdir)dep/mingw/include/xaudio2
|
|
|
|
endif
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
ifdef UNICODE
|
|
|
|
# lib = -lunicows
|
|
|
|
endif
|
|
|
|
|
2015-10-09 10:31:46 +00:00
|
|
|
lib += -luser32 -lgdi32 -lcomdlg32 -lcomctl32 -lshell32 -lwinmm -lshlwapi -ladvapi32 -lsetupapi -lole32 -luuid -lwininet
|
|
|
|
|
|
|
|
ifdef INCLUDE_AVI_RECORDING
|
|
|
|
lib += -lvfw32
|
|
|
|
endif
|
2018-03-27 13:40:40 +00:00
|
|
|
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
depobj += resource.o \
|
|
|
|
|
|
|
|
autdep = $(depobj:.o=.d)
|
2017-07-03 10:30:51 +00:00
|
|
|
drvdep = $(drvsrc:.o=.d)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
ifdef BUILD_A68K
|
|
|
|
a68k.o = $(objdir)cpu/a68k/a68k.o
|
|
|
|
endif
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
app_gnuc.rc = $(srcdir)dep/generated/app_gnuc.rc
|
|
|
|
license.rtf = $(srcdir)dep/generated/license.rtf
|
|
|
|
driverlist.h = $(srcdir)dep/generated/driverlist.h
|
|
|
|
ctv.h = $(srcdir)dep/generated/ctv.h
|
|
|
|
toa_gp9001_func.h = $(srcdir)dep/generated/toa_gp9001_func.h
|
|
|
|
neo_sprite_func.h = $(srcdir)dep/generated/neo_sprite_func.h
|
|
|
|
cave_tile_func.h = $(srcdir)dep/generated/cave_tile_func.h
|
|
|
|
cave_sprite_func.h = $(srcdir)dep/generated/cave_sprite_func.h
|
|
|
|
psikyo_tile_func.h = $(srcdir)dep/generated/psikyo_tile_func.h
|
|
|
|
pgm_sprite.h = $(srcdir)dep/generated/pgm_sprite.h
|
|
|
|
build_details.h = $(srcdir)dep/generated/build_details.h
|
2011-12-03 20:27:59 +00:00
|
|
|
|
2014-11-09 17:15:57 +00:00
|
|
|
allobj = $(objdir)cpu/m68k/m68kcpu.o $(objdir)cpu/m68k/m68kops.o \
|
2011-12-03 20:27:59 +00:00
|
|
|
$(foreach file,$(autobj:.o=.c), \
|
|
|
|
$(foreach dir,$(alldir),$(subst $(srcdir),$(objdir), \
|
|
|
|
$(firstword $(subst .c,.o,$(wildcard $(srcdir)$(dir)/$(file))))))) \
|
|
|
|
$(foreach file,$(autobj:.o=.cpp), \
|
|
|
|
$(foreach dir,$(alldir),$(subst $(srcdir),$(objdir), \
|
|
|
|
$(firstword $(subst .cpp,.o,$(wildcard $(srcdir)$(dir)/$(file))))))) \
|
|
|
|
$(foreach file,$(autobj:.o=.asm), \
|
|
|
|
$(foreach dir,$(alldir),$(subst $(srcdir),$(objdir), \
|
|
|
|
$(firstword $(subst .asm,.o,$(wildcard $(srcdir)$(dir)/$(file))))))) \
|
|
|
|
$(foreach file,$(autobj:.o=.rc), \
|
|
|
|
$(foreach dir,$(alldir),$(subst $(srcdir),$(objdir), \
|
|
|
|
$(firstword $(subst .rc,.o,$(wildcard $(srcdir)$(dir)/$(file)))))))
|
|
|
|
|
|
|
|
ifdef BUILD_A68K
|
|
|
|
allobj += $(a68k.o)
|
|
|
|
endif
|
|
|
|
|
|
|
|
alldep = $(foreach file,$(autobj:.o=.c), \
|
|
|
|
$(foreach dir,$(alldir),$(subst $(srcdir),$(objdir), \
|
|
|
|
$(firstword $(subst .c,.d,$(wildcard $(srcdir)$(dir)/$(file))))))) \
|
|
|
|
$(foreach file,$(autobj:.o=.cpp), \
|
|
|
|
$(foreach dir,$(alldir),$(subst $(srcdir),$(objdir), \
|
|
|
|
$(firstword $(subst .cpp,.d,$(wildcard $(srcdir)$(dir)/$(file))))))) \
|
|
|
|
$(foreach file,$(autobj:.o=.rc), \
|
|
|
|
$(foreach dir,$(alldir),$(subst $(srcdir),$(objdir), \
|
|
|
|
$(firstword $(subst .rc,.d,$(wildcard $(srcdir)$(dir)/$(file)))))))
|
2017-07-03 10:30:51 +00:00
|
|
|
|
|
|
|
autdrv := $(drvsrc:.cpp=.o)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Specify compiler/linker/assembler
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
CXX = g++
|
|
|
|
LD = $(CXX)
|
|
|
|
AS = nasm
|
|
|
|
|
|
|
|
LDFLAGS = -static
|
|
|
|
|
|
|
|
ifdef GCC345
|
|
|
|
CFLAGS = -pipe \
|
|
|
|
-std=gnu99 -march=$(CPUTYPE) -O1 \
|
|
|
|
-mno-cygwin -mwindows \
|
|
|
|
-fforce-mem -fforce-addr -finline-limit=1200 -fthread-jumps \
|
|
|
|
-freduce-all-givs -fmove-all-movables -fexpensive-optimizations \
|
|
|
|
-Wall -Wno-long-long -Wno-sign-compare -Wno-uninitialized -Wno-unused \
|
2012-01-03 13:31:23 +00:00
|
|
|
$(DEF) $(incdir)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
CXXFLAGS = -pipe \
|
2011-12-20 21:13:52 +00:00
|
|
|
-march=$(CPUTYPE) -O1 \
|
2011-12-03 20:27:59 +00:00
|
|
|
-mno-cygwin -mwindows \
|
|
|
|
-fforce-mem -fforce-addr -finline-limit=1200 -fthread-jumps \
|
|
|
|
-freduce-all-givs -fmove-all-movables -fexpensive-optimizations \
|
|
|
|
-fcheck-new \
|
|
|
|
-Wall -W -pedantic -Wno-long-long \
|
|
|
|
-Wunknown-pragmas -Wundef -Wconversion -Wno-missing-braces \
|
|
|
|
-Wuninitialized -Wpointer-arith -Winline -Wno-multichar \
|
2012-01-03 13:31:23 +00:00
|
|
|
$(DEF) $(incdir)
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
|
|
|
ifdef GCC452
|
|
|
|
CFLAGS = -pipe \
|
|
|
|
-std=gnu99 -march=$(CPUTYPE) -O1 \
|
|
|
|
-mno-cygwin -mwindows \
|
|
|
|
-fforce-addr -finline-limit=1200 -fthread-jumps \
|
|
|
|
-fexpensive-optimizations \
|
|
|
|
-Wall -Wno-long-long -Wno-sign-compare -Wno-uninitialized -Wno-unused \
|
|
|
|
-Wno-sequence-point \
|
2012-01-03 13:31:23 +00:00
|
|
|
$(DEF) $(incdir)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
CXXFLAGS = -pipe \
|
|
|
|
-march=$(CPUTYPE) -O1 \
|
|
|
|
-mno-cygwin -mwindows \
|
|
|
|
-fforce-addr -finline-limit=1200 -fthread-jumps \
|
|
|
|
-fexpensive-optimizations -fcheck-new \
|
|
|
|
-Wall -W -pedantic -Wshadow -Wno-long-long -Wno-write-strings \
|
|
|
|
-Wunknown-pragmas -Wundef -Wno-conversion -Wno-missing-braces -Wno-multichar \
|
|
|
|
-Wuninitialized -Wpointer-arith -Wno-inline -Wno-address -Wno-unused-value \
|
|
|
|
-Wno-sequence-point \
|
2012-01-03 13:31:23 +00:00
|
|
|
$(DEF) $(incdir)
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
2012-11-16 20:52:52 +00:00
|
|
|
ifdef GCC471
|
2011-12-03 20:27:59 +00:00
|
|
|
CFLAGS = -pipe \
|
2018-03-27 13:40:40 +00:00
|
|
|
-std=gnu99 -O1 \
|
2011-12-03 20:27:59 +00:00
|
|
|
-mwindows \
|
|
|
|
-fforce-addr -finline-limit=1200 -fthread-jumps \
|
2018-03-27 13:40:40 +00:00
|
|
|
-fexpensive-optimizations \
|
2011-12-03 20:27:59 +00:00
|
|
|
-Wall -Wno-long-long -Wno-sign-compare -Wno-uninitialized -Wno-unused \
|
|
|
|
-Wno-sequence-point \
|
2012-01-03 13:31:23 +00:00
|
|
|
$(DEF) $(incdir)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
CXXFLAGS = -pipe \
|
2018-03-27 13:40:40 +00:00
|
|
|
-std=gnu++11 -O1 \
|
2011-12-03 20:27:59 +00:00
|
|
|
-mwindows \
|
|
|
|
-fforce-addr -finline-limit=1200 -fthread-jumps \
|
|
|
|
-fexpensive-optimizations -fcheck-new \
|
|
|
|
-Wall -W -pedantic -Wshadow -Wno-long-long -Wno-write-strings \
|
|
|
|
-Wunknown-pragmas -Wundef -Wno-conversion -Wno-missing-braces -Wno-multichar \
|
|
|
|
-Wuninitialized -Wpointer-arith -Wno-inline -Wno-address -Wno-unused-value \
|
2012-11-17 08:47:01 +00:00
|
|
|
-Wno-unused-but-set-variable -Wno-sequence-point -Wno-narrowing -Wno-extra \
|
2012-01-03 13:31:23 +00:00
|
|
|
$(DEF) $(incdir)
|
2015-09-17 13:53:20 +00:00
|
|
|
|
|
|
|
ifdef BUILD_X64_EXE
|
|
|
|
CFLAGS += -m64
|
|
|
|
CXXFLAGS += -m64
|
|
|
|
LDFLAGS += -m64
|
|
|
|
else
|
|
|
|
CFLAGS += -m32
|
|
|
|
CXXFLAGS += -m32
|
|
|
|
LDFLAGS += -m32
|
|
|
|
endif
|
|
|
|
endif
|
2011-12-03 20:27:59 +00:00
|
|
|
|
2015-09-17 13:53:20 +00:00
|
|
|
ifdef GCC510
|
|
|
|
CFLAGS = -pipe \
|
|
|
|
-std=gnu99 -O1 \
|
|
|
|
-mwindows \
|
|
|
|
-fforce-addr -finline-limit=1200 -fthread-jumps \
|
|
|
|
-fexpensive-optimizations \
|
|
|
|
-Wall -Wno-long-long -Wno-sign-compare -Wno-uninitialized -Wno-unused \
|
|
|
|
-Wno-sequence-point -Wno-pedantic \
|
|
|
|
$(DEF) $(incdir)
|
|
|
|
|
|
|
|
CXXFLAGS = -pipe \
|
|
|
|
-std=gnu++11 -O1 \
|
|
|
|
-mwindows \
|
|
|
|
-fforce-addr -finline-limit=1200 -fthread-jumps \
|
|
|
|
-fexpensive-optimizations -fcheck-new \
|
|
|
|
-Wall -W -pedantic -Wshadow -Wno-long-long -Wno-write-strings \
|
|
|
|
-Wunknown-pragmas -Wundef -Wno-conversion -Wno-missing-braces -Wno-multichar \
|
|
|
|
-Wuninitialized -Wpointer-arith -Wno-inline -Wno-address -Wno-unused-value \
|
|
|
|
-Wno-unused-but-set-variable -Wno-sequence-point -Wno-narrowing -Wno-extra \
|
|
|
|
-Wno-pedantic \
|
|
|
|
$(DEF) $(incdir)
|
2011-12-03 20:27:59 +00:00
|
|
|
ifdef BUILD_X64_EXE
|
|
|
|
CFLAGS += -m64
|
|
|
|
CXXFLAGS += -m64
|
|
|
|
LDFLAGS += -m64
|
2016-11-21 13:41:14 +00:00
|
|
|
|
|
|
|
# allow nasty C code in i8051.cpp
|
|
|
|
CXXFLAGS += -fpermissive
|
2011-12-03 20:27:59 +00:00
|
|
|
else
|
|
|
|
CFLAGS += -m32
|
|
|
|
CXXFLAGS += -m32
|
|
|
|
LDFLAGS += -m32
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ASFLAGS = -O1 -f coff -w-orphan-labels
|
|
|
|
|
|
|
|
# D3DUtils & D3DMath need these
|
|
|
|
# DEF = -Dsinf=\(float\)sin -Dcosf=\(float\)cos -Dasinf=\(float\)asin -Dacosf=\(float\)acos -Dsqrtf=\(float\)sqrt
|
|
|
|
|
|
|
|
DEF := -DBUILD_WIN32 -DUSE_SPEEDHACKS -DFILENAME=$(NAME) -DMMX=$(MMX)
|
|
|
|
|
|
|
|
ifdef UNICODE
|
|
|
|
DEF := $(DEF) -D_UNICODE
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SPECIALBUILD
|
|
|
|
DEF := $(DEF) -DSPECIALBUILD=$(SPECIALBUILD)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef FASTCALL
|
|
|
|
DEF := $(DEF) -DFASTCALL
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef DEBUG
|
|
|
|
ifdef GCC345
|
|
|
|
CFLAGS += -mconsole
|
|
|
|
endif
|
|
|
|
ifdef GCC452
|
|
|
|
CFLAGS += -mconsole
|
|
|
|
endif
|
|
|
|
DEF := $(DEF) -DFBA_DEBUG
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef ROM_VERIFY
|
|
|
|
DEF := $(DEF) -DROM_VERIFY
|
|
|
|
endif
|
|
|
|
|
2012-02-16 20:45:47 +00:00
|
|
|
ifdef INCLUDE_7Z_SUPPORT
|
|
|
|
DEF := $(DEF) -DINCLUDE_7Z_SUPPORT
|
|
|
|
endif
|
|
|
|
|
2015-10-09 10:31:46 +00:00
|
|
|
ifdef INCLUDE_AVI_RECORDING
|
|
|
|
DEF := $(DEF) -DINCLUDE_AVI_RECORDING
|
|
|
|
endif
|
|
|
|
|
2012-01-28 08:10:57 +00:00
|
|
|
ifdef LSB_FIRST
|
2012-01-25 20:13:10 +00:00
|
|
|
DEF := $(DEF) -DLSB_FIRST
|
|
|
|
endif
|
|
|
|
|
2012-03-09 14:07:59 +00:00
|
|
|
ifdef INCLUDE_LIB_PNGH
|
|
|
|
DEF := $(DEF) -DINCLUDE_LIB_PNGH
|
|
|
|
endif
|
|
|
|
|
2011-12-03 20:27:59 +00:00
|
|
|
ifdef BUILD_A68K
|
|
|
|
DEF := $(DEF) -DBUILD_A68K
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef BUILD_X86_ASM
|
|
|
|
DEF := $(DEF) -DBUILD_X86_ASM
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef BUILD_X64_EXE
|
|
|
|
DEF := $(DEF) -DBUILD_X64_EXE
|
2018-03-27 13:40:40 +00:00
|
|
|
ifdef INCLUDE_CPLUSPLUS11_FILES
|
|
|
|
DEF := $(DEF) -DXBYAK_NO_OP_NAMES -DMIPS3_X64_DRC
|
|
|
|
endif
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
|
|
|
|
2017-06-07 09:19:36 +00:00
|
|
|
ifdef USE_SEGOE
|
|
|
|
DEF := $(DEF) -DUSE_SEGOE
|
|
|
|
endif
|
|
|
|
|
2011-12-03 20:27:59 +00:00
|
|
|
ifdef SYMBOL
|
|
|
|
|
|
|
|
CFLAGS += -ggdb3
|
|
|
|
ASFLAGS += -g
|
|
|
|
DEF := $(DEF) -D_DEBUG
|
|
|
|
|
|
|
|
ifdef PROFILE
|
|
|
|
CFLAGS += -pg
|
|
|
|
CXXFLAGS += -pg
|
|
|
|
else
|
|
|
|
CFLAGS += -fomit-frame-pointer
|
|
|
|
CXXFLAGS += -fomit-frame-pointer
|
|
|
|
endif
|
|
|
|
|
|
|
|
else
|
|
|
|
LDFLAGS += -s
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef BUILD_X86_ASM
|
|
|
|
CFLAGS += -mmmx
|
|
|
|
CXXFLAGS += -mmmx
|
|
|
|
endif
|
|
|
|
|
|
|
|
# For zlib
|
|
|
|
DEF := $(DEF) -DNO_VIZ -D_LARGEFILE64_SOURCE=0 -D_FILE_OFFSET_BITS=32
|
|
|
|
|
2012-02-16 20:45:47 +00:00
|
|
|
# For lib7z
|
|
|
|
ifdef INCLUDE_7Z_SUPPORT
|
|
|
|
DEF := $(DEF) -D_7ZIP_PPMD_SUPPPORT
|
|
|
|
endif
|
|
|
|
|
2011-12-03 20:27:59 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# Specify paths
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
vpath %.asm $(foreach dir,$(alldir),$(srcdir)$(dir)/ )
|
|
|
|
vpath %.cpp $(foreach dir,$(alldir),$(srcdir)$(dir)/ )
|
|
|
|
vpath %.c $(foreach dir,$(alldir),$(srcdir)$(dir)/ )
|
|
|
|
vpath %.h $(foreach dir,$(alldir),$(srcdir)$(dir)/ )
|
|
|
|
vpath %.rc $(foreach dir,$(alldir),$(srcdir)$(dir)/ )
|
|
|
|
|
|
|
|
vpath %.o $(foreach dir,$(alldir),$(objdir)$(dir)/ )
|
|
|
|
vpath %.d $(foreach dir,$(alldir),$(objdir)$(dir)/ )
|
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Rules
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
.PHONY: all init cleandep touch clean
|
|
|
|
|
|
|
|
ifeq ($(MAKELEVEL),1)
|
|
|
|
ifdef DEPEND
|
|
|
|
|
2017-07-03 10:30:51 +00:00
|
|
|
all: init $(drvdep) $(autdep) $(autobj) $(autdrv)
|
2011-12-03 20:27:59 +00:00
|
|
|
ifdef GCC345
|
|
|
|
@$(MAKE) -f makefile.mingw -s GCC345=1
|
|
|
|
endif
|
|
|
|
ifdef GCC452
|
|
|
|
@$(MAKE) -f makefile.mingw -s GCC452=1
|
|
|
|
endif
|
2012-11-16 20:52:52 +00:00
|
|
|
ifdef GCC471
|
|
|
|
@$(MAKE) -f makefile.mingw -s GCC471=1
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
2015-09-17 13:53:20 +00:00
|
|
|
ifdef GCC510
|
|
|
|
@$(MAKE) -f makefile.mingw -s GCC510=1
|
|
|
|
endif
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2017-07-03 10:30:51 +00:00
|
|
|
all: init $(autobj) $(autdrv)
|
2011-12-03 20:27:59 +00:00
|
|
|
ifdef GCC345
|
|
|
|
@$(MAKE) -f makefile.mingw -s GCC345=1
|
|
|
|
endif
|
|
|
|
ifdef GCC452
|
|
|
|
@$(MAKE) -f makefile.mingw -s GCC452=1
|
|
|
|
endif
|
2012-11-16 20:52:52 +00:00
|
|
|
ifdef GCC471
|
|
|
|
@$(MAKE) -f makefile.mingw -s GCC471=1
|
2011-12-03 20:27:59 +00:00
|
|
|
endif
|
2015-09-17 13:53:20 +00:00
|
|
|
ifdef GCC510
|
|
|
|
@$(MAKE) -f makefile.mingw -s GCC510=1
|
|
|
|
endif
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
|
|
|
|
all: $(NAME).exe
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Rule for linking the executable
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(MAKELEVEL),2)
|
|
|
|
|
2018-04-10 00:47:38 +00:00
|
|
|
$(objdir)drivers.o: $(autdrv)
|
2017-07-03 10:30:51 +00:00
|
|
|
@echo Linking drivers...
|
|
|
|
ifdef BUILD_X64_EXE
|
|
|
|
@$(LD) -m64 -r -nostdlib -o $@ $^
|
|
|
|
else
|
|
|
|
@$(LD) -m32 -r -nostdlib -o $@ $^
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(NAME).exe: $(allobj) $(objdir)/drivers.o
|
2011-12-03 20:27:59 +00:00
|
|
|
@echo
|
|
|
|
@echo Linking executable... $(NAME).exe
|
2018-03-27 13:40:40 +00:00
|
|
|
@$(LD) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(lib)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
ifdef DEBUG
|
|
|
|
|
|
|
|
# Don't compress when making a debug build
|
|
|
|
|
|
|
|
else
|
|
|
|
ifdef COMPRESS
|
|
|
|
@upx --best $@
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(MAKELEVEL),1)
|
|
|
|
ifdef FORCE_UPDATE
|
|
|
|
$(build_details.h): FORCE
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate the gamelist
|
|
|
|
#
|
|
|
|
|
|
|
|
burn.o burn.d: driverlist.h
|
|
|
|
|
2017-07-03 10:30:51 +00:00
|
|
|
$(driverlist.h): $(drvsrc) $(srcdir)dep/scripts/gamelist.pl
|
2011-12-03 20:27:59 +00:00
|
|
|
ifdef PERL
|
2012-01-18 20:24:14 +00:00
|
|
|
@$(srcdir)dep/scripts/gamelist.pl -o $@ -l gamelist.txt \
|
2017-07-03 10:30:51 +00:00
|
|
|
$(filter %.cpp,$(foreach file,$(drvsrc:.o=.cpp),$(foreach dir,$(alldir), \
|
2011-12-03 20:27:59 +00:00
|
|
|
$(firstword $(wildcard $(srcdir)$(dir)/$(file))))))
|
|
|
|
else
|
|
|
|
ifeq ($(MAKELEVEL),2)
|
|
|
|
@echo
|
|
|
|
@echo Warning: Perl is not available on this system.
|
|
|
|
@echo $@ cannot be updated or created!
|
|
|
|
@echo
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify if driverlist.h needs to be updated
|
|
|
|
#
|
|
|
|
|
|
|
|
#ifeq ($(MAKELEVEL),1)
|
|
|
|
#ifdef FORCE_UPDATE
|
|
|
|
#$(driverlist.h): FORCE
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Fix the .rc file
|
|
|
|
#
|
|
|
|
|
|
|
|
resource.o resource.d: $(app_gnuc.rc) string.rc version.rc version.h $(build_details.h)
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(license.rtf): $(srcdir)license.txt $(srcdir)dep/scripts/license2rtf.pl
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
ifdef PERL
|
2017-06-07 09:19:36 +00:00
|
|
|
ifdef USE_SEGOE
|
|
|
|
@$(srcdir)dep/scripts/license2rtf.pl $< -o $(srcdir)dep/generated/$(@F:.rc=.rtf) -f 'Segoe UI'
|
|
|
|
else
|
2012-01-18 20:24:14 +00:00
|
|
|
@$(srcdir)dep/scripts/license2rtf.pl $< -o $(srcdir)dep/generated/$(@F:.rc=.rtf)
|
2017-06-07 09:19:36 +00:00
|
|
|
endif
|
2011-12-03 20:27:59 +00:00
|
|
|
else
|
|
|
|
ifeq ($(MAKELEVEL),2)
|
|
|
|
@echo
|
|
|
|
@echo Warning: Perl is not available on this system.
|
|
|
|
@echo $@ cannot be updated or created!
|
|
|
|
@echo
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(app_gnuc.rc): app.rc $(license.rc) $(license.rtf) $(srcdir)dep/scripts/fixrc.pl $(srcdir)burner/resource/fba.ico $(srcdir)burner/resource/about.bmp $(srcdir)burner/resource/splash.bmp $(srcdir)burner/resource/misc.bmp
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
ifdef PERL
|
2012-01-18 20:24:14 +00:00
|
|
|
@$(srcdir)dep/scripts/fixrc.pl $< -o $@
|
2011-12-03 20:27:59 +00:00
|
|
|
else
|
|
|
|
ifeq ($(MAKELEVEL),2)
|
|
|
|
@echo
|
|
|
|
@echo Warning: Perl is not available on this system.
|
|
|
|
@echo $@ cannot be updated or created!
|
|
|
|
@echo
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate some info on the build details
|
|
|
|
#
|
|
|
|
|
|
|
|
about.o about.d: $(build_details.h)
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(build_details.h): $(srcdir)dep/scripts/build_details.cpp
|
|
|
|
@$(CXX) -mconsole $(CXXFLAGS) $(LDFLAGS) $< -o $(objdir)dep/generated/build_details.exe
|
|
|
|
@$(objdir)dep/generated/build_details.exe >$@
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Compile 68000 cores
|
|
|
|
#
|
|
|
|
|
|
|
|
# A68K
|
|
|
|
|
|
|
|
ifdef BUILD_A68K
|
|
|
|
$(a68k.o): fba_make68k.c
|
|
|
|
@echo Compiling A68K MC68000 core...
|
|
|
|
@$(CC) -mconsole $(CFLAGS) $(LDFLAGS) -DWIN32 -Wno-unused -Wno-conversion -Wno-missing-prototypes \
|
|
|
|
-s $< -o $(subst $(srcdir),$(objdir),$(<D))/$(<F:.c=.exe)
|
|
|
|
@$(subst $(srcdir),$(objdir),$(<D))/$(<F:.c=.exe) $(@:.o=.asm) \
|
|
|
|
$(@D)/a68k_tab.asm 00 $(ppro)
|
|
|
|
@echo Assembling A68K MC68000 core...
|
|
|
|
@$(AS) $(ASFLAGS) $(@:.o=.asm) -o $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Musashi
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(objdir)cpu/m68k/m68kcpu.o: $(srcdir)cpu/m68k/m68kcpu.c $(objdir)dep/generated/m68kops.h $(srcdir)cpu/m68k/m68k.h $(srcdir)cpu/m68k/m68kconf.h
|
2011-12-03 20:27:59 +00:00
|
|
|
@echo Compiling Musashi MC680x0 core \(m68kcpu.c\)...
|
|
|
|
@$(CC) $(CFLAGS) -c $(srcdir)cpu/m68k/m68kcpu.c -o $(objdir)cpu/m68k/m68kcpu.o
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(objdir)cpu/m68k/m68kops.o: $(objdir)cpu/m68k/m68kmake.exe $(objdir)dep/generated/m68kops.h $(objdir)dep/generated/m68kops.c $(srcdir)cpu/m68k/m68k.h $(srcdir)cpu/m68k/m68kconf.h
|
2011-12-03 20:27:59 +00:00
|
|
|
@echo Compiling Musashi MC680x0 core \(m68kops.c\)...
|
2012-01-18 20:24:14 +00:00
|
|
|
@$(CC) $(CFLAGS) -c $(objdir)dep/generated/m68kops.c -o $(objdir)cpu/m68k/m68kops.o
|
2011-12-03 20:27:59 +00:00
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(objdir)dep/generated/m68kops.h: $(objdir)cpu/m68k/m68kmake.exe $(srcdir)cpu/m68k/m68k_in.c
|
|
|
|
$(objdir)/cpu/m68k/m68kmake $(objdir)dep/generated/ $(srcdir)cpu/m68k/m68k_in.c
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
$(objdir)cpu/m68k/m68kmake.exe: $(srcdir)cpu/m68k/m68kmake.c
|
|
|
|
@echo Compiling Musashi MC680x0 core \(m68kmake.c\)...
|
|
|
|
@$(CC) $(CFLAGS) $(srcdir)cpu/m68k/m68kmake.c -o $(objdir)cpu/m68k/m68kmake.exe
|
|
|
|
|
|
|
|
|
|
|
|
#
|
2018-04-10 00:47:38 +00:00
|
|
|
# Extra rules for generated header file ctv.h, needed by ctv.cpp
|
2011-12-03 20:27:59 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
ctv.d ctv.o: $(ctv.h)
|
|
|
|
|
|
|
|
$(ctv.h): ctv_make.cpp
|
2012-01-18 20:24:14 +00:00
|
|
|
@echo Generating $(srcdir)dep/generated/$(@F)...
|
2011-12-03 20:27:59 +00:00
|
|
|
@$(CC) -mconsole $(CXXFLAGS) $(LDFLAGS) $< \
|
|
|
|
-o $(subst $(srcdir),$(objdir),$(<D))/$(<F:.cpp=.exe)
|
|
|
|
@$(subst $(srcdir),$(objdir),$(<D))/$(<F:.cpp=.exe) >$@
|
|
|
|
|
|
|
|
#
|
|
|
|
# Extra rules for generated header file toa_gp9001_func.h, needed by toa_gp9001.cpp
|
|
|
|
#
|
|
|
|
|
|
|
|
toa_bcu2.d toa_bcu2.o toa_gp9001.d toa_gp9001.o: $(toa_gp9001_func.h)
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(toa_gp9001_func.h): $(srcdir)dep/scripts/toa_gp9001_func.pl
|
|
|
|
@$(srcdir)dep/scripts/toa_gp9001_func.pl -o $(toa_gp9001_func.h)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Extra rules for generated header file neo_sprite_func.h, needed by neo_sprite.cpp
|
|
|
|
#
|
|
|
|
|
|
|
|
neo_sprite.d neo_sprite.o: $(neo_sprite_func.h)
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(neo_sprite_func.h): $(srcdir)dep/scripts/neo_sprite_func.pl
|
|
|
|
@$(srcdir)dep/scripts/neo_sprite_func.pl -o $(neo_sprite_func.h)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Extra rules for generated header file cave_tile_func.h, needed by cave_tile.cpp
|
|
|
|
#
|
|
|
|
|
|
|
|
cave_tile.d cave_tile.o: $(cave_tile_func.h)
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(cave_tile_func.h): $(srcdir)dep/scripts/cave_tile_func.pl
|
|
|
|
@$(srcdir)dep/scripts/cave_tile_func.pl -o $(cave_tile_func.h)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Extra rules for generated header file cave_sprite_func.h, needed by cave_sprite.cpp
|
|
|
|
#
|
|
|
|
|
|
|
|
cave_sprite.d cave_sprite.o: $(cave_sprite_func.h)
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(cave_sprite_func.h): $(srcdir)dep/scripts/cave_sprite_func.pl
|
|
|
|
@$(srcdir)dep/scripts/cave_sprite_func.pl -o $(cave_sprite_func.h)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Extra rules for generated header file psikyo_tile_func.h / psikyo_sprite_func.h, needed by psikyo_tile.cpp / psikyo_sprite.cpp
|
|
|
|
#
|
|
|
|
|
|
|
|
psikyo_tile.d psikyo_tile.o psikyosprite.d psikyo_sprite.o: $(psikyo_tile_func.h)
|
|
|
|
|
2012-01-18 20:24:14 +00:00
|
|
|
$(psikyo_tile_func.h): $(srcdir)dep/scripts/psikyo_tile_func.pl
|
|
|
|
$(srcdir)dep/scripts/psikyo_tile_func.pl -o $(psikyo_tile_func.h)
|
2011-12-03 20:27:59 +00:00
|
|
|
|
2011-12-15 11:27:03 +00:00
|
|
|
#
|
|
|
|
# Extra rules for generated header file pgm_sprite.h, needed by pgm_draw.cpp
|
|
|
|
#
|
|
|
|
|
|
|
|
pgm_draw.d pgm_draw.o: $(pgm_sprite.h)
|
|
|
|
|
|
|
|
$(pgm_sprite.h): pgm_sprite_create.cpp
|
2012-01-18 20:24:14 +00:00
|
|
|
@echo Generating $(srcdir)dep/generated/$(@F)...
|
2011-12-15 11:27:03 +00:00
|
|
|
@$(CC) -mconsole $(CXXFLAGS) $(LDFLAGS) $< \
|
|
|
|
-o $(subst $(srcdir),$(objdir),$(<D))/$(<F:.cpp=.exe)
|
|
|
|
@$(subst $(srcdir),$(objdir),$(<D))/$(<F:.cpp=.exe) >$@
|
|
|
|
|
|
|
|
|
2011-12-03 20:27:59 +00:00
|
|
|
ifeq ($(MAKELEVEL),2)
|
|
|
|
ifdef DEPEND
|
|
|
|
|
|
|
|
include $(alldep)
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generic rule for resource files
|
|
|
|
#
|
|
|
|
|
|
|
|
%.o: %.rc
|
|
|
|
@echo Compiling resource file $(<F)...
|
|
|
|
ifdef GCC345
|
|
|
|
@windres $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
|
|
|
|
endif
|
|
|
|
ifdef GCC452
|
|
|
|
@windres $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
|
|
|
|
endif
|
2012-11-16 20:52:52 +00:00
|
|
|
ifdef GCC471
|
2011-12-03 20:27:59 +00:00
|
|
|
ifdef BUILD_X64_EXE
|
|
|
|
@windres -F pe-x86-64 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
|
|
|
|
else
|
|
|
|
@windres -F pe-i386 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
|
|
|
|
endif
|
|
|
|
endif
|
2015-09-17 13:53:20 +00:00
|
|
|
ifdef GCC510
|
|
|
|
ifdef BUILD_X64_EXE
|
|
|
|
@windres -F pe-x86-64 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
|
|
|
|
else
|
|
|
|
@windres -F pe-i386 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
|
|
|
|
endif
|
|
|
|
endif
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Generic rules for C/C++ files
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(MAKELEVEL),1)
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
@echo Compiling $<...
|
|
|
|
@$(CC) $(CXXFLAGS) -c $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@echo Compiling $<...
|
|
|
|
@$(CC) $(CFLAGS) -c $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F)
|
|
|
|
|
|
|
|
%.o: %.asm
|
|
|
|
@echo Assembling $<...
|
|
|
|
@$(AS) $(ASFLAGS) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@echo Compiling $<...
|
|
|
|
@$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
%.o: %.asm
|
|
|
|
@echo Assembling $<...
|
|
|
|
@$(AS) $(ASFLAGS) $< -o $@
|
|
|
|
|
|
|
|
%.o:
|
|
|
|
@echo Compiling $<...
|
|
|
|
@$(CC) $(CXXFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate dependencies for C/C++ files
|
|
|
|
#
|
|
|
|
|
|
|
|
ifdef DEPEND
|
|
|
|
|
|
|
|
%.d: %.c
|
|
|
|
@echo Generating depend file for $<...
|
|
|
|
@$(CC) -MM -MT "$(subst $(srcdir),$(objdir),$(<D))/$(*F).o $(subst $(srcdir),$(objdir),$(<D))/$(@F)" -x c++ $(CXXFLAGS) $< >$(subst $(srcdir),$(objdir),$(<D))/$(@F)
|
|
|
|
|
|
|
|
%.d: %.cpp
|
|
|
|
@echo Generating depend file for $<...
|
|
|
|
@$(CC) -MM -MT "$(subst $(srcdir),$(objdir),$(<D))/$(*F).o $(subst $(srcdir),$(objdir),$(<D))/$(@F)" -x c++ $(CXXFLAGS) $< >$(subst $(srcdir),$(objdir),$(<D))/$(@F)
|
|
|
|
|
|
|
|
%.d: %.rc
|
|
|
|
@echo Generating depend file for $<...
|
|
|
|
@$(CC) -MM -MT "$(subst $(srcdir),$(objdir),$(<D))/$(*F).o $(subst $(srcdir),$(objdir),$(<D))/$(@F)" -x c++ $(CXXFLAGS) $< >$(subst $(srcdir),$(objdir),$(<D))/$(@F)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Phony targets
|
|
|
|
#
|
|
|
|
|
|
|
|
init:
|
|
|
|
|
|
|
|
ifdef DEBUG
|
|
|
|
@echo Making debug build...
|
|
|
|
else
|
|
|
|
@echo Making normal build...
|
|
|
|
endif
|
|
|
|
@echo
|
|
|
|
@mkdir -p $(foreach dir, $(alldir),$(objdir)$(dir))
|
2012-01-18 20:24:14 +00:00
|
|
|
@mkdir -p $(srcdir)dep/generated
|
2011-12-03 20:27:59 +00:00
|
|
|
|
|
|
|
cleandep:
|
|
|
|
@echo Removing depend files from $(objdir)...
|
|
|
|
-@for dir in $(alldir); do rm -f $(objdir)$$dir/*.d; done
|
|
|
|
|
|
|
|
touch:
|
|
|
|
@echo Marking all targets for $(NAME) as uptodate...
|
|
|
|
-@touch $(NAME).exe
|
2012-01-18 20:24:14 +00:00
|
|
|
-@touch -c -r $(NAME).exe $(srcdir)/dep/generated/*
|
2011-12-03 20:27:59 +00:00
|
|
|
-@for dir in $(alldir); do touch -c -r $(NAME).exe $(objdir)$$dir/*; done
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo Removing all files from $(objdir)...
|
|
|
|
-@rm -f -r $(objdir)
|
|
|
|
-@rm -f -r $(ctv.h)
|
|
|
|
|
|
|
|
ifdef PERL
|
|
|
|
@echo Removing all files generated with perl scripts...
|
|
|
|
-@rm -f -r $(app_gnuc.rc) $(driverlist)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Rule to force recompilation of any target that depends on it
|
|
|
|
#
|
|
|
|
|
|
|
|
FORCE:
|