Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (48 sloc) 1.84 KB
# Copyright (c) 2018 Damien Ciabrini
# This file is part of ngdevkit
#
# ngdevkit is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# ngdevkit is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
include Makefile
ifeq ($(strip $(GNGEO_INSTALL_PATH)),)
$(error Missing GnGEO installation path (GNGEO_INSTALL_PATH). See README.mingw for more details)
else
GNGEO_CFG=$(GNGEO_INSTALL_PATH)/conf/gngeorc
endif
ifeq ($(strip $(SDL2_DLL)),)
$(error Missing path to SDL2.dll (SDL2_DLL). See README.mingw for more details)
endif
# default mingw compiler
ifeq ($(strip $(MINGW_GCC)),)
MINGW_GCC=$(shell uname -p)-w64-mingw32-gcc
endif
ifeq ($(strip $(ZLIB1_DLL)),)
ZLIB1_DLL=$(shell $(MINGW_GCC) -print-file-name=zlib1.dll)
endif
# GLEW compile flags if configured
ifneq ($(strip $(GLEW_BIN_PATH)),)
GLEW_FLAGS=--with-glew=$(GLEW_BIN_PATH)
ifeq ($(strip $(shell uname -p)),x86_64)
GLEW_DIR=$(GLEW_BIN_PATH)/bin/Release/x64
else
GLEW_DIR=$(GLEW_BIN_PATH)/bin/Release/Win32
endif
GLEW_DLL=$(GLEW_DIR)/glew32.dll
else
GLEW_FLAGS=
GLEW_DLL=
endif
GNGEO_BUILD_FLAGS=--enable-mingw --host=x86_64-w64-mingw32 $(GLEW_FLAGS) --prefix=$(GNGEO_INSTALL_PATH) CPPFLAGS="-I$(LOCALDIR)/include" CFLAGS="-I$(LOCALDIR)/include" LDFLAGS="-L$(LOCALDIR)/lib"
all: install-emulator-dll
install-emulator-dll: build-emulator
cp $(SDL2_DLL) $(ZLIB1_DLL) $(GLEW_DLL) $(GNGEO_INSTALL_PATH)