forked from Dniel97/segatools
update build system
This commit is contained in:
parent
5935e322e8
commit
301a0e0ce7
15
Makefile
15
Makefile
@ -1,5 +1,3 @@
|
|||||||
SHELL = /bin/bash
|
|
||||||
|
|
||||||
V ?= @
|
V ?= @
|
||||||
|
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
@ -7,16 +5,12 @@ V ?= @
|
|||||||
BUILD_DIR := build
|
BUILD_DIR := build
|
||||||
BUILD_DIR_32 := $(BUILD_DIR)/build32
|
BUILD_DIR_32 := $(BUILD_DIR)/build32
|
||||||
BUILD_DIR_64 := $(BUILD_DIR)/build64
|
BUILD_DIR_64 := $(BUILD_DIR)/build64
|
||||||
BUILD_DIR_DOCKER := $(BUILD_DIR)/docker
|
|
||||||
BUILD_DIR_ZIP := $(BUILD_DIR)/zip
|
BUILD_DIR_ZIP := $(BUILD_DIR)/zip
|
||||||
|
|
||||||
DOC_DIR := doc
|
DOC_DIR := doc
|
||||||
|
|
||||||
DIST_DIR := dist
|
DIST_DIR := dist
|
||||||
|
|
||||||
DOCKER_CONTAINER_NAME := "segatools-build"
|
|
||||||
DOCKER_IMAGE_NAME := "segatools:build"
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Targets
|
# Targets
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
@ -44,15 +38,6 @@ zip: $(BUILD_DIR_ZIP)/segatools.zip
|
|||||||
clean:
|
clean:
|
||||||
$(V)rm -rf $(BUILD_DIR) subprojects/capnhook
|
$(V)rm -rf $(BUILD_DIR) subprojects/capnhook
|
||||||
|
|
||||||
.PHONY: build-docker # Build the project in a docker container
|
|
||||||
build-docker:
|
|
||||||
$(V)docker rm -f $(DOCKER_CONTAINER_NAME) 2> /dev/null || true
|
|
||||||
$(V)docker build -t $(DOCKER_IMAGE_NAME) -f Dockerfile .
|
|
||||||
$(V)docker create --name $(DOCKER_CONTAINER_NAME) $(DOCKER_IMAGE_NAME)
|
|
||||||
$(V)rm -rf $(BUILD_DIR_DOCKER)
|
|
||||||
$(V)mkdir -p $(BUILD_DIR_DOCKER)
|
|
||||||
$(V)docker cp $(DOCKER_CONTAINER_NAME):/segatools/$(BUILD_DIR_ZIP) $(BUILD_DIR_DOCKER)
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Utility, combo and alias targets
|
# Utility, combo and alias targets
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
:: Static Environment Variables
|
:: Static Environment Variables
|
||||||
set BUILD_OUTPUT_PATH=build\docker
|
|
||||||
set IMAGE_NAME=djhackers/segatools-build:latest
|
set IMAGE_NAME=djhackers/segatools-build:latest
|
||||||
set CONTAINER_NAME=segatools-build
|
set CONTAINER_NAME=segatools-build
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ add_project_arguments(
|
|||||||
'-DWIN32_LEAN_AND_MEAN',
|
'-DWIN32_LEAN_AND_MEAN',
|
||||||
'-D_WIN32_WINNT=_WIN32_WINNT_WIN7',
|
'-D_WIN32_WINNT=_WIN32_WINNT_WIN7',
|
||||||
'-DMINGW_HAS_SECURE_API=1',
|
'-DMINGW_HAS_SECURE_API=1',
|
||||||
|
'-Wno-unused',
|
||||||
language: 'c',
|
language: 'c',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user