2017-10-28 22:00:32 +00:00
|
|
|
TARGET_NAME := chailove
|
2017-06-19 19:30:00 +00:00
|
|
|
|
2017-10-19 23:22:40 +00:00
|
|
|
include Makefile.libretro
|
2017-09-08 16:43:05 +00:00
|
|
|
|
2017-10-19 23:22:40 +00:00
|
|
|
ifeq ($(STATIC_LINKING),1)
|
|
|
|
FLAGS += -DSTATIC_LINKING
|
2017-07-06 01:43:05 +00:00
|
|
|
endif
|
|
|
|
|
2017-10-19 23:22:40 +00:00
|
|
|
FLAGS += -D__LIBRETRO__ $(COREDEFINES) $(ENDIANNESS_DEFINES) $(PLATFORM_DEFINES) $(WARNINGS) $(fpic)
|
2017-06-19 19:30:00 +00:00
|
|
|
|
2017-12-21 09:16:43 +00:00
|
|
|
CXXFLAGS += $(FLAGS) -std=c++14
|
2017-06-19 19:30:00 +00:00
|
|
|
CFLAGS += $(FLAGS) -std=gnu99
|
|
|
|
|
2018-03-05 06:38:23 +00:00
|
|
|
# Ignore failed builds, and re-try to attribute for dependency chains.
|
2018-03-16 13:39:15 +00:00
|
|
|
$(TARGET): $(OBJECTS) | vendor/libretro-common/include/libretro.h
|
2018-03-16 13:24:10 +00:00
|
|
|
-$(CXX) -o $@ $^ $(LDFLAGS)
|
2017-06-19 19:30:00 +00:00
|
|
|
|
2018-03-16 13:39:15 +00:00
|
|
|
%.o: %.cpp | vendor/libretro-common/include/libretro.h
|
2018-03-16 13:24:10 +00:00
|
|
|
-$(CXX) -c -o $@ $< $(CXXFLAGS)
|
2017-06-19 19:30:00 +00:00
|
|
|
|
2018-03-16 13:39:15 +00:00
|
|
|
%.o: %.c | vendor/libretro-common/include/libretro.h
|
2018-03-16 13:24:10 +00:00
|
|
|
-$(CC) -c -o $@ $< $(CFLAGS)
|
2017-06-19 19:30:00 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGET) $(OBJECTS)
|
2017-12-22 10:42:41 +00:00
|
|
|
git clean -xdf
|
2017-12-22 10:55:16 +00:00
|
|
|
rm -rf vendor
|
|
|
|
git submodule update --init --recursive
|
2017-12-22 10:44:18 +00:00
|
|
|
git submodule foreach --recursive git clean -xfd
|
2017-12-22 10:55:16 +00:00
|
|
|
git submodule foreach --recursive git reset --hard HEAD
|
2017-06-19 19:30:00 +00:00
|
|
|
|
2018-03-16 13:28:19 +00:00
|
|
|
vendor/libretro-common/include/libretro.h:
|
2017-11-30 06:22:43 +00:00
|
|
|
@git submodule update --init --recursive
|
2017-06-21 04:43:30 +00:00
|
|
|
|
2017-11-30 06:22:43 +00:00
|
|
|
test: unittest cpplint
|
|
|
|
@echo "Run the testing suite by using:\n\n retroarch -L $(TARGET) test/main.chai\n\n"
|
2017-11-29 07:31:31 +00:00
|
|
|
|
2018-03-16 13:39:15 +00:00
|
|
|
vendor/noarch/noarch: vendor/libretro-common/include/libretro.h
|
2017-11-30 06:22:43 +00:00
|
|
|
@$(MAKE) -C vendor/noarch
|
2017-11-29 07:31:31 +00:00
|
|
|
|
2018-03-16 13:24:10 +00:00
|
|
|
unittest: vendor/noarch/noarch $(TARGET)
|
|
|
|
vendor/noarch/noarch $(CORE_DIR)/$(TARGET) test/unittests/main.chai
|
2017-06-24 19:14:28 +00:00
|
|
|
|
2018-03-16 13:24:10 +00:00
|
|
|
examples: $(TARGET)
|
2017-11-30 06:22:43 +00:00
|
|
|
@retroarch -L $(TARGET) examples/benchmark/main.chai
|
2017-07-13 04:36:36 +00:00
|
|
|
|
2018-03-16 13:24:10 +00:00
|
|
|
test-script: $(TARGET)
|
2017-11-30 06:22:43 +00:00
|
|
|
@retroarch -L $(TARGET) test/main.chai
|
2017-07-15 15:11:53 +00:00
|
|
|
|
2017-11-19 00:28:23 +00:00
|
|
|
docs: dependencies
|
|
|
|
doxygen docs/Doxyfile
|
|
|
|
|
2017-12-13 16:21:13 +00:00
|
|
|
docs-start: docs
|
|
|
|
php -S localhost:9999 -t docs/html
|
|
|
|
|
2017-11-19 00:31:44 +00:00
|
|
|
docs-deploy: docs
|
2018-02-19 21:48:15 +00:00
|
|
|
npm install push-dir && node_modules/.bin/push-dir --dir=docs/html --branch=docs
|
2017-11-19 00:31:44 +00:00
|
|
|
|
2018-03-16 13:24:10 +00:00
|
|
|
cpplint: vendor
|
2017-11-30 06:22:43 +00:00
|
|
|
@vendor/styleguide/cpplint/cpplint.py \
|
|
|
|
--linelength=120 \
|
|
|
|
--quiet \
|
|
|
|
--counting=detailed \
|
|
|
|
--filter=-build/include,-legal/copyright,-runtime/int,-runtime-readability/braces,\
|
|
|
|
-runtime/threadsafe_fn,-build/namespaces,-runtime/explicit,-whitespace/tab,\
|
|
|
|
-readability/casting,-whitespace/line_length,-runtime/references \
|
2017-12-18 16:10:33 +00:00
|
|
|
src/*.h src/*.cpp src/love/*.h src/love/*.cpp src/love/Types/*/*.h src/love/Types/*/*.cpp
|
2017-11-30 01:36:09 +00:00
|
|
|
|
2018-03-16 13:24:10 +00:00
|
|
|
tests: vendor
|
2017-07-15 15:11:53 +00:00
|
|
|
$(MAKE) HAVE_CHAISCRIPT=0 HAVE_TESTS=1
|
2017-07-15 14:35:01 +00:00
|
|
|
|
2018-02-13 20:51:34 +00:00
|
|
|
test-native: tests
|
2018-02-13 21:04:28 +00:00
|
|
|
retroarch -L $(TARGET) test/native/main.chai
|
2017-07-15 20:47:48 +00:00
|
|
|
|
2017-08-31 03:11:10 +00:00
|
|
|
PREFIX := /usr
|
|
|
|
INSTALLDIR := $(PREFIX)/lib/libretro
|
2018-03-16 13:24:10 +00:00
|
|
|
install: $(TARGET)
|
2017-08-31 03:11:10 +00:00
|
|
|
mkdir -p $(DESTDIR)$(INSTALLDIR)
|
|
|
|
cp $(TARGET) $(DESTDIR)$(INSTALLDIR)
|