2005-06-29 13:11:03 +00:00
|
|
|
##============================================================================
|
|
|
|
##
|
|
|
|
## SSSS tt lll lll
|
|
|
|
## SS SS tt ll ll
|
|
|
|
## SS tttttt eeee ll ll aaaa
|
|
|
|
## SSSS tt ee ee ll ll aa
|
|
|
|
## SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
|
|
## SS SS tt ee ll ll aa aa
|
|
|
|
## SSSS ttt eeeee llll llll aaaaa
|
|
|
|
##
|
2021-12-31 19:37:17 +00:00
|
|
|
## Copyright (c) 1995-2022 by Bradford W. Mott, Stephen Anthony
|
2010-04-10 21:37:23 +00:00
|
|
|
## and the Stella Team
|
2005-06-29 13:11:03 +00:00
|
|
|
##
|
2010-01-10 03:23:32 +00:00
|
|
|
## See the file "License.txt" for information on usage and redistribution of
|
2005-06-29 13:11:03 +00:00
|
|
|
## this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
##============================================================================
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
# Default compilation parameters. Normally don't edit these #
|
|
|
|
#######################################################################
|
|
|
|
|
|
|
|
srcdir ?= .
|
|
|
|
|
2020-12-15 22:55:24 +00:00
|
|
|
DEFINES := -DSDL_SUPPORT -D_GLIBCXX_USE_CXX11_ABI=1
|
2017-08-10 13:26:05 +00:00
|
|
|
LDFLAGS := -pthread
|
2005-06-28 18:56:49 +00:00
|
|
|
INCLUDES :=
|
2006-06-11 21:49:10 +00:00
|
|
|
LIBS :=
|
2005-06-28 18:56:49 +00:00
|
|
|
OBJS :=
|
2006-02-01 13:53:25 +00:00
|
|
|
PROF :=
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
MODULES :=
|
|
|
|
MODULE_DIRS :=
|
|
|
|
|
2005-10-22 20:33:57 +00:00
|
|
|
DISTNAME := stella-snapshot
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
# Load the make rules generated by configure
|
|
|
|
include config.mak
|
|
|
|
|
|
|
|
# Uncomment this for stricter compile time code verification
|
|
|
|
# CXXFLAGS+= -Werror
|
|
|
|
|
2005-06-29 13:11:03 +00:00
|
|
|
ifdef CXXFLAGS
|
2020-12-16 00:55:45 +00:00
|
|
|
CFLAGS:= $(CXXFLAGS)
|
2017-07-09 19:19:17 +00:00
|
|
|
CXXFLAGS:= $(CXXFLAGS) -x c++
|
2005-06-29 13:11:03 +00:00
|
|
|
else
|
2017-07-09 19:19:17 +00:00
|
|
|
CXXFLAGS:= -O2 -x c++
|
2020-12-16 00:55:45 +00:00
|
|
|
CFLAGS:= -O2
|
2005-06-29 13:11:03 +00:00
|
|
|
endif
|
2019-03-03 15:40:07 +00:00
|
|
|
|
2019-05-03 15:09:03 +00:00
|
|
|
CXXFLAGS+= -Wall -Wextra -Wno-unused-parameter
|
2020-12-16 00:55:45 +00:00
|
|
|
CFLAGS+= -Wall -Wextra -Wno-unused-parameter
|
2019-03-03 15:40:07 +00:00
|
|
|
|
2012-01-06 22:38:09 +00:00
|
|
|
ifdef HAVE_GCC
|
2020-11-28 14:18:00 +00:00
|
|
|
CXXFLAGS+= -Wno-multichar -Wunused -Woverloaded-virtual -Wnon-virtual-dtor -std=c++17
|
2020-12-16 00:55:45 +00:00
|
|
|
CFLAGS+= -Wno-multichar -Wunused
|
2012-01-06 22:38:09 +00:00
|
|
|
endif
|
2019-03-03 15:40:07 +00:00
|
|
|
|
|
|
|
ifdef HAVE_CLANG
|
2020-11-28 14:18:00 +00:00
|
|
|
CXXFLAGS+= -Wno-multichar -Wunused -Woverloaded-virtual -Wnon-virtual-dtor -std=c++17
|
2020-12-16 00:55:45 +00:00
|
|
|
CFLAGS+= -Wno-multichar -Wunused
|
2019-03-03 15:40:07 +00:00
|
|
|
endif
|
|
|
|
|
2017-10-16 17:09:40 +00:00
|
|
|
ifdef CLANG_WARNINGS
|
2021-10-01 16:27:46 +00:00
|
|
|
EXTRA_WARN=-Weverything -Wno-c++98-compat-pedantic -Wno-unknown-warning-option \
|
2019-04-21 17:40:07 +00:00
|
|
|
-Wno-switch-enum -Wno-conversion -Wno-covered-switch-default \
|
2018-01-27 23:04:26 +00:00
|
|
|
-Wno-inconsistent-missing-destructor-override -Wno-float-equal \
|
2017-10-12 00:19:31 +00:00
|
|
|
-Wno-exit-time-destructors -Wno-global-constructors -Wno-weak-vtables \
|
2021-11-29 21:46:29 +00:00
|
|
|
-Wno-four-char-constants -Wno-padded -Wno-reserved-identifier \
|
2022-12-29 13:49:14 +00:00
|
|
|
-Wno-duplicate-enum -Wno-unsafe-buffer-usage
|
2020-12-13 23:10:11 +00:00
|
|
|
|
2020-12-16 00:55:45 +00:00
|
|
|
CXXFLAGS+= $(EXTRA_WARN)
|
|
|
|
CFLAGS+= $(EXTRA_WARN)
|
2017-10-12 00:19:31 +00:00
|
|
|
endif
|
2006-02-01 13:53:25 +00:00
|
|
|
|
|
|
|
ifdef PROFILE
|
2019-03-03 15:40:07 +00:00
|
|
|
PROF:= -pg -fprofile-arcs -ftest-coverage
|
2006-02-01 13:53:25 +00:00
|
|
|
CXXFLAGS+= $(PROF)
|
2020-12-16 00:55:45 +00:00
|
|
|
CFLAGS+= $(PROF)
|
2019-03-03 15:40:07 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef DEBUG
|
2022-05-29 21:16:29 +00:00
|
|
|
CXXFLAGS += -g -Wp,-D_GLIBCXX_DEBUG
|
|
|
|
CFLAGS += -g -Wp,-D_GLIBCXX_DEBUG
|
2006-02-01 13:53:25 +00:00
|
|
|
else
|
2012-01-06 22:38:09 +00:00
|
|
|
ifdef HAVE_GCC
|
|
|
|
CXXFLAGS+= -fomit-frame-pointer
|
2020-12-16 00:55:45 +00:00
|
|
|
CFLAGS+= -fomit-frame-pointer
|
2012-01-06 22:38:09 +00:00
|
|
|
endif
|
2006-02-01 13:53:25 +00:00
|
|
|
|
2019-05-03 15:09:03 +00:00
|
|
|
ifdef HAVE_CLANG
|
|
|
|
CXXFLAGS+= -fomit-frame-pointer
|
2020-12-16 00:55:45 +00:00
|
|
|
CFLAGS+= -fomit-frame-pointer
|
2019-05-03 15:09:03 +00:00
|
|
|
endif
|
2019-03-03 15:40:07 +00:00
|
|
|
endif
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2020-08-26 17:57:41 +00:00
|
|
|
ifdef RELEASE
|
2020-11-19 15:05:02 +00:00
|
|
|
CXXFLAGS += -flto -fno-rtti
|
2020-12-16 00:55:45 +00:00
|
|
|
CFLAGS += -flto
|
2020-11-19 15:05:02 +00:00
|
|
|
LDFLAGS += -flto -fno-rtti
|
2020-08-26 17:57:41 +00:00
|
|
|
endif
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
#######################################################################
|
|
|
|
# Misc stuff - you should never have to edit this #
|
|
|
|
#######################################################################
|
|
|
|
|
2019-04-27 19:34:59 +00:00
|
|
|
ifdef STELLA_BUILD_ROOT
|
|
|
|
OBJECT_ROOT := $(STELLA_BUILD_ROOT)/stella-out
|
|
|
|
else
|
|
|
|
OBJECT_ROOT := out
|
|
|
|
endif
|
2019-03-03 23:52:29 +00:00
|
|
|
OBJECT_ROOT_PROFILE_GENERERATE := out.pgen
|
|
|
|
OBJECT_ROOT_PROFILE_USE := out.pgo
|
|
|
|
|
2019-03-03 15:40:07 +00:00
|
|
|
EXECUTABLE := stella$(EXEEXT)
|
|
|
|
EXECUTABLE_PROFILE_GENERATE := stella-pgo-generate$(EXEEXT)
|
|
|
|
EXECUTABLE_PROFILE_USE := stella-pgo$(EXEEXT)
|
|
|
|
|
2020-06-15 21:35:20 +00:00
|
|
|
PROFILE_DIR = $(CURDIR)/test/roms/profile
|
2019-03-03 15:40:07 +00:00
|
|
|
PROFILE_OUT = $(PROFILE_DIR)/out
|
|
|
|
PROFILE_STAMP = profile.stamp
|
|
|
|
|
|
|
|
CXXFLAGS_PROFILE_GENERATE = $(CXXFLAGS)
|
|
|
|
CXXFLAGS_PROFILE_USE = $(CXXFLAGS)
|
2020-12-13 23:10:11 +00:00
|
|
|
CFLAGS_PROFILE_GENERATE = $(CFLAGS)
|
|
|
|
CFLAGS_PROFILE_USE = $(CFLAGS)
|
2019-03-03 15:40:07 +00:00
|
|
|
LDFLAGS_PROFILE_GENERATE = $(LDFLAGS)
|
|
|
|
STELLA_PROFILE_GENERATE = $(BINARY_LOADER) ./$(EXECUTABLE_PROFILE_GENERATE) -profile \
|
|
|
|
$(PROFILE_DIR)/128.bin:10 \
|
|
|
|
$(PROFILE_DIR)/catharsis_theory.bin:60
|
|
|
|
|
|
|
|
ifdef HAVE_CLANG
|
|
|
|
CXXFLAGS_PROFILE_GENERATE += -fprofile-generate=$(PROFILE_OUT)
|
|
|
|
CXXFLAGS_PROFILE_USE += -fprofile-use=$(PROFILE_OUT)
|
2020-12-13 23:10:11 +00:00
|
|
|
CFLAGS_PROFILE_GENERATE += -fprofile-generate=$(PROFILE_OUT)
|
|
|
|
CFLAGS_PROFILE_USE += -fprofile-use=$(PROFILE_OUT)
|
2019-03-03 15:40:07 +00:00
|
|
|
LDFLAGS_PROFILE_GENERATE += -fprofile-generate
|
|
|
|
STELLA_PROFILE_GENERATE := \
|
|
|
|
LLVM_PROFILE_FILE="$(PROFILE_OUT)/default.profraw" $(STELLA_PROFILE_GENERATE) && \
|
|
|
|
$(LLVM_PROFDATA) merge -o $(PROFILE_OUT)/default.profdata $(PROFILE_OUT)/default.profraw
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef HAVE_GCC
|
|
|
|
CXXFLAGS_PROFILE_GENERATE += -fprofile-generate -fprofile-dir=$(PROFILE_OUT)
|
|
|
|
CXXFLAGS_PROFILE_USE += -fprofile-use -fprofile-dir=$(PROFILE_OUT)
|
2020-12-13 23:10:11 +00:00
|
|
|
CFLAGS_PROFILE_GENERATE += -fprofile-generate -fprofile-dir=$(PROFILE_OUT)
|
|
|
|
CFLAGS_PROFILE_USE += -fprofile-use -fprofile-dir=$(PROFILE_OUT)
|
2019-03-03 15:40:07 +00:00
|
|
|
LDFLAGS_PROFILE_GENERATE += -fprofile-generate
|
2019-03-03 23:52:29 +00:00
|
|
|
STELLA_PROFILE_GENERATE := $(STELLA_PROFILE_GENERATE) && \
|
2021-11-30 21:31:23 +00:00
|
|
|
(rm -fr $(PROFILE_OUT)/$(OBJECT_ROOT_PROFILE_USE) || true) && \
|
|
|
|
(mv $(PROFILE_OUT)/$(OBJECT_ROOT_PROFILE_GENERERATE) $(PROFILE_OUT)/$(OBJECT_ROOT_PROFILE_USE) || true)
|
2019-03-03 15:40:07 +00:00
|
|
|
endif
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2011-04-22 18:57:20 +00:00
|
|
|
all: $(EXECUTABLE)
|
2005-06-28 23:18:16 +00:00
|
|
|
|
2019-03-03 15:40:07 +00:00
|
|
|
pgo: $(EXECUTABLE_PROFILE_USE)
|
2005-06-28 23:18:16 +00:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Various minor settings
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
# The name for the directory used for dependency tracking
|
|
|
|
DEPDIR := .deps
|
|
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Module settings
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
MODULES := $(MODULES)
|
|
|
|
|
|
|
|
# After the game specific modules follow the shared modules
|
|
|
|
MODULES += \
|
2012-02-26 20:11:59 +00:00
|
|
|
src/common \
|
2019-05-02 20:28:39 +00:00
|
|
|
src/common/audio \
|
2018-05-08 22:38:01 +00:00
|
|
|
src/common/tv_filters \
|
2019-05-02 20:28:39 +00:00
|
|
|
src/emucore \
|
|
|
|
src/emucore/tia \
|
2020-12-13 23:10:11 +00:00
|
|
|
src/emucore/tia/frame-manager \
|
2021-12-20 03:06:13 +00:00
|
|
|
src/common/repository/sqlite
|
2005-06-28 23:18:16 +00:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# The build rules follow - normally you should have no need to
|
|
|
|
# touch whatever comes after here.
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
# Concat DEFINES and INCLUDES to form the CPPFLAGS
|
|
|
|
CPPFLAGS:= $(DEFINES) $(INCLUDES)
|
|
|
|
|
|
|
|
# Include the build instructions for all modules
|
|
|
|
-include $(addprefix $(srcdir)/, $(addsuffix /module.mk,$(MODULES)))
|
|
|
|
|
|
|
|
# Depdir information
|
|
|
|
DEPDIRS = $(addsuffix /$(DEPDIR),$(MODULE_DIRS))
|
2017-07-09 19:19:17 +00:00
|
|
|
DEPFILES =
|
2005-06-28 23:18:16 +00:00
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
OBJ=$(addprefix $(OBJECT_ROOT)/,$(OBJS))
|
|
|
|
OBJ_PROFILE_GENERATE=$(addprefix $(OBJECT_ROOT_PROFILE_GENERERATE)/,$(OBJS))
|
|
|
|
OBJ_PROFILE_USE=$(addprefix $(OBJECT_ROOT_PROFILE_USE)/,$(OBJS))
|
2019-03-03 15:40:07 +00:00
|
|
|
|
2005-06-28 23:18:16 +00:00
|
|
|
# The build rule for the Stella executable
|
2019-03-03 23:52:29 +00:00
|
|
|
$(EXECUTABLE): $(OBJ)
|
2006-02-01 13:53:25 +00:00
|
|
|
$(LD) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) $(PROF) -o $@
|
2005-06-28 23:18:16 +00:00
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(EXECUTABLE_PROFILE_GENERATE): $(OBJ_PROFILE_GENERATE)
|
2019-03-03 15:40:07 +00:00
|
|
|
$(LD) $(LDFLAGS_PROFILE_GENERATE) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) $(PROF) -o $@
|
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(EXECUTABLE_PROFILE_USE): $(OBJ_PROFILE_USE)
|
2019-03-03 15:59:18 +00:00
|
|
|
$(LD) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) $(PROF) -o $@
|
2019-03-03 15:40:07 +00:00
|
|
|
|
2005-06-28 23:18:16 +00:00
|
|
|
distclean: clean
|
|
|
|
$(RM_REC) $(DEPDIRS)
|
|
|
|
$(RM) build.rules config.h config.mak config.log
|
|
|
|
|
|
|
|
clean:
|
2019-03-03 15:40:07 +00:00
|
|
|
-$(RM) -fr \
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT) $(OBJECT_ROOT_PROFILE_GENERERATE) $(OBJECT_ROOT_PROFILE_USE) \
|
2019-03-03 15:40:07 +00:00
|
|
|
$(EXECUTABLE) $(EXECUTABLE_PROFILE_GENERATE) $(EXECUTABLE_PROFILE_USE) \
|
|
|
|
$(PROFILE_OUT) $(PROFILE_STAMP)
|
2005-06-28 23:18:16 +00:00
|
|
|
|
2005-09-30 22:12:18 +00:00
|
|
|
.PHONY: all clean dist distclean
|
2005-06-28 23:18:16 +00:00
|
|
|
|
|
|
|
.SUFFIXES: .cxx
|
2012-01-06 22:38:09 +00:00
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
define create_dir
|
|
|
|
$(MKDIR) -p $(*D)/$(DEPDIR)
|
|
|
|
$(MKDIR) -p $(@D)
|
2019-03-03 15:40:07 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define merge_dep
|
|
|
|
$(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d
|
|
|
|
$(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d"
|
|
|
|
$(RM) "$(*D)/$(DEPDIR)/$(*F).d2"
|
|
|
|
endef
|
2012-01-06 22:38:09 +00:00
|
|
|
|
|
|
|
ifndef CXX_UPDATE_DEP_FLAG
|
2005-06-28 23:18:16 +00:00
|
|
|
# If you use GCC, disable the above and enable this for intelligent
|
2017-07-09 19:19:17 +00:00
|
|
|
# dependency tracking.
|
2012-01-06 22:38:09 +00:00
|
|
|
CXX_UPDATE_DEP_FLAG = -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2"
|
2019-03-03 15:40:07 +00:00
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT)/%.o: %.cxx
|
|
|
|
$(create_dir)
|
2019-03-03 15:40:07 +00:00
|
|
|
$(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $@
|
|
|
|
$(merge_dep)
|
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT)/%.o: %.c
|
|
|
|
$(create_dir)
|
2020-12-13 23:10:11 +00:00
|
|
|
$(CC) $(CXX_UPDATE_DEP_FLAG) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $@
|
2019-03-03 15:40:07 +00:00
|
|
|
$(merge_dep)
|
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT_PROFILE_GENERERATE)/%.pgen.o: %.cxx
|
|
|
|
$(create_dir)
|
2019-03-03 15:40:07 +00:00
|
|
|
$(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS_PROFILE_GENERATE) $(CPPFLAGS) -c $(<) -o $@
|
|
|
|
$(merge_dep)
|
|
|
|
|
2020-12-13 23:10:11 +00:00
|
|
|
$(OBJECT_ROOT_PROFILE_GENERERATE)/%.pgen.o: %.c
|
2019-03-03 23:52:29 +00:00
|
|
|
$(create_dir)
|
2020-12-13 23:10:11 +00:00
|
|
|
$(CC) $(CXX_UPDATE_DEP_FLAG) $(CFLAGS_PROFILE_GENERATE) $(CPPFLAGS) -c $(<) -o $@
|
2019-03-03 15:40:07 +00:00
|
|
|
$(merge_dep)
|
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT_PROFILE_USE)/%.pgo.o: %.cxx $(PROFILE_STAMP)
|
|
|
|
$(create_dir)
|
2019-03-03 15:40:07 +00:00
|
|
|
$(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS_PROFILE_USE) $(CPPFLAGS) -c $(<) -o $@
|
|
|
|
$(merge_dep)
|
|
|
|
|
2020-12-13 23:10:11 +00:00
|
|
|
$(OBJECT_ROOT_PROFILE_USE)/%.pgo.o: %.c $(PROFILE_STAMP)
|
2019-03-03 23:52:29 +00:00
|
|
|
$(create_dir)
|
2020-12-13 23:10:11 +00:00
|
|
|
$(CC) $(CXX_UPDATE_DEP_FLAG) $(CFLAGS_PROFILE_USE) $(CPPFLAGS) -c $(<) -o $@
|
2019-03-03 15:40:07 +00:00
|
|
|
$(merge_dep)
|
|
|
|
|
2005-06-28 23:18:16 +00:00
|
|
|
else
|
|
|
|
# If you even have GCC 3.x, you can use this build rule, which is safer; the above
|
|
|
|
# rule can get you into a bad state if you Ctrl-C at the wrong moment.
|
|
|
|
# Also, with this GCC inserts additional dummy rules for the involved headers,
|
|
|
|
# which ensures a smooth compilation even if said headers become obsolete.
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT)/%.o: %.cxx
|
|
|
|
$(create_dir)
|
2019-03-03 15:40:07 +00:00
|
|
|
$(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $@
|
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT)/%.o: %.c
|
|
|
|
$(create_dir)
|
2020-12-13 23:10:11 +00:00
|
|
|
$(CC) $(CXX_UPDATE_DEP_FLAG) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $@
|
2019-03-03 15:40:07 +00:00
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT_PROFILE_GENERERATE)/%.o: %.cxx
|
|
|
|
$(create_dir)
|
2019-03-03 15:40:07 +00:00
|
|
|
$(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS_PROFILE_GENERATE) $(CPPFLAGS) -c $(<) -o $@
|
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT_PROFILE_GENERERATE)/%.o: %.c
|
|
|
|
$(create_dir)
|
2020-12-13 23:10:11 +00:00
|
|
|
$(CC) $(CXX_UPDATE_DEP_FLAG) $(CFLAGS_PROFILE_GENERATE) $(CPPFLAGS) -c $(<) -o $@
|
2019-03-03 15:40:07 +00:00
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT_PROFILE_USE)/%.o: %.cxx $(PROFILE_STAMP)
|
|
|
|
$(create_dir)
|
2019-03-03 15:40:07 +00:00
|
|
|
$(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS_PROFILE_USE) $(CPPFLAGS) -c $(<) -o $@
|
|
|
|
|
2019-03-03 23:52:29 +00:00
|
|
|
$(OBJECT_ROOT_PROFILE_USE)/%.o: %.c $(PROFILE_STAMP)
|
|
|
|
$(create_dir)
|
2020-12-13 23:10:11 +00:00
|
|
|
$(CC) $(CXX_UPDATE_DEP_FLAG) $(CFLAGS_PROFILE_USE) $(CPPFLAGS) -c $(<) -o $@
|
2005-06-29 13:11:03 +00:00
|
|
|
|
2005-06-28 23:18:16 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Include the dependency tracking files. We add /dev/null at the end
|
|
|
|
# of the list to avoid a warning/error if no .d file exist
|
|
|
|
-include $(wildcard $(addsuffix /*.d,$(DEPDIRS))) /dev/null
|
2005-06-28 18:56:49 +00:00
|
|
|
|
2019-03-03 15:40:07 +00:00
|
|
|
$(PROFILE_STAMP): $(EXECUTABLE_PROFILE_GENERATE)
|
|
|
|
-rm -fr $(PROFILE_OUT)
|
|
|
|
$(STELLA_PROFILE_GENERATE)
|
|
|
|
touch $(PROFILE_STAMP)
|
|
|
|
|
2005-06-28 18:56:49 +00:00
|
|
|
# check if configure has been run or has been changed since last run
|
|
|
|
config.mak: $(srcdir)/configure
|
|
|
|
@echo "You need to run ./configure before you can run make"
|
|
|
|
@echo "Either you haven't run it before or it has changed."
|
|
|
|
@exit 1
|
|
|
|
|
|
|
|
install: all
|
|
|
|
$(INSTALL) -d "$(DESTDIR)$(BINDIR)"
|
2019-03-09 21:18:19 +00:00
|
|
|
$(INSTALL) -c -m 755 "$(srcdir)/stella$(EXEEXT)" "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)"
|
2005-09-30 22:12:18 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DOCDIR)"
|
2022-10-11 02:03:51 +00:00
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/Announce.txt" "$(srcdir)/Changes.txt" "$(srcdir)/Copyright.txt" "$(srcdir)/License.txt" "$(srcdir)/README-SDL.txt" "$(srcdir)/README.md" "$(srcdir)/Todo.txt" "$(srcdir)/docs/index.html" "$(srcdir)/docs/debugger.html" "$(DESTDIR)$(DOCDIR)/"
|
2005-09-30 22:12:18 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DOCDIR)/graphics"
|
2007-08-16 16:42:46 +00:00
|
|
|
$(INSTALL) -c -m 644 $(wildcard $(srcdir)/docs/graphics/*.png) "$(DESTDIR)$(DOCDIR)/graphics"
|
2006-11-09 03:06:42 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/applications"
|
2022-08-18 21:45:28 +00:00
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/src/os/unix/stella.desktop" "$(DESTDIR)$(DATADIR)/applications"
|
2011-12-27 01:57:06 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons/hicolor/22x22/apps"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons/hicolor/64x64/apps"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps"
|
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella-16x16.png" "$(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps/stella.png"
|
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella-22x22.png" "$(DESTDIR)$(DATADIR)/icons/hicolor/22x22/apps/stella.png"
|
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella-24x24.png" "$(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps/stella.png"
|
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella-32x32.png" "$(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps/stella.png"
|
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella-48x48.png" "$(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps/stella.png"
|
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella-64x64.png" "$(DESTDIR)$(DATADIR)/icons/hicolor/64x64/apps/stella.png"
|
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella-128x128.png" "$(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps/stella.png"
|
2006-03-19 20:57:55 +00:00
|
|
|
|
2005-09-30 22:12:18 +00:00
|
|
|
install-strip: install
|
2008-03-09 15:30:27 +00:00
|
|
|
$(STRIP) stella$(EXEEXT)
|
2005-06-28 18:56:49 +00:00
|
|
|
|
|
|
|
uninstall:
|
2005-10-03 00:53:20 +00:00
|
|
|
rm -f "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)"
|
2005-09-30 22:12:18 +00:00
|
|
|
rm -rf "$(DESTDIR)$(DOCDIR)/"
|
2006-11-09 03:06:42 +00:00
|
|
|
rm -f "$(DESTDIR)$(DATADIR)/applications/stella.desktop"
|
2011-12-27 01:57:06 +00:00
|
|
|
rm -f "$(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps/stella.png"
|
|
|
|
rm -f "$(DESTDIR)$(DATADIR)/icons/hicolor/22x22/apps/stella.png"
|
|
|
|
rm -f "$(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps/stella.png"
|
|
|
|
rm -f "$(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps/stella.png"
|
|
|
|
rm -f "$(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps/stella.png"
|
|
|
|
rm -f "$(DESTDIR)$(DATADIR)/icons/hicolor/64x64/apps/stella.png"
|
|
|
|
rm -f "$(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps/stella.png"
|
2005-09-30 22:12:18 +00:00
|
|
|
|
Added rule for recompiling the M6502.m4 script to the Makefile, because I'm
tired of doing it manually every time it changes.
Tweaked the handling of JSR, RTI and RTS commands, so they don't erroneously
mark associated addresses as CODE when in fact they're never actually
executed.
Several parts of the Distella code were marking areas as DATA, even though
it depending on knowing the values for the X and Y registers (which it
doesn't, as it's a static analysis). As such, these areas are now marked
as ROW instead, since that's as precise as a static analysis can do. The
processing blocks are left there, though, in case Distella is improved in
a future release.
All the above changes allow for better disassembly with less
'false positives' (ie, areas marked as CODE or DATA when they really aren't).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2172 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-11-07 22:52:42 +00:00
|
|
|
# Special rule for M6502.ins, generated from m4 (there's probably a better way to do this ...)
|
|
|
|
src/emucore/M6502.ins: src/emucore/M6502.m4
|
|
|
|
m4 src/emucore/M6502.m4 > src/emucore/M6502.ins
|
|
|
|
|
2013-09-27 20:41:24 +00:00
|
|
|
# Special rule for windows icon stuff (there's probably a better way to do this ...)
|
2022-08-18 21:45:28 +00:00
|
|
|
src/os/windows/stella_icon.o: src/os/windows/stella.ico src/os/windows/stella.rc
|
|
|
|
windres --include-dir src/os/windows src/os/windows/stella.rc src/os/windows/stella_icon.o
|
2017-07-09 19:19:17 +00:00
|
|
|
|
2011-04-22 18:57:20 +00:00
|
|
|
.PHONY: deb bundle test install uninstall
|