- cleanup makefiles

This commit is contained in:
SoftCoder 2017-09-25 18:55:35 -07:00
parent d8073423a7
commit 97a89d0bb0
4 changed files with 18 additions and 21 deletions

View File

@ -7,7 +7,7 @@ $(error STEAMWORKS is not set)
endif
CXX ?= clang++
WINDRES ?= windres
# WINDRES ?= windres
HOST ?= linux64
FLAGS := -I$(STEAMWORKS)/public -DGAME_LAUNCH_NAME=\"$(GAME_LAUNCH_NAME)\" -Wall
@ -30,20 +30,22 @@ else ifeq ($(HOST),w32)
endif
SRC := steamshim_parent.cpp
RES := resources.rc
RESOBJ := resources.o
# RES := resources.rc
# RESOBJ := resources.o
ifeq ($(HOST),w32)
$(TARGET).exe: $(SRC) $(RESOBJ)
# $(TARGET).exe: $(SRC) $(RESOBJ)
$(TARGET).exe: $(SRC)
$(CXX) $^ -o $@ $(FLAGS)
$(RESOBJ): $(RES)
$(WINDRES) $< $@
# $(RESOBJ): $(RES)
# $(WINDRES) $< $@
else
$(TARGET): $(SRC)
$(CXX) $^ -o $@ $(FLAGS)
endif
clean:
rm -f $(TARGET) $(TARGET).exe $(RESOBJ)
# rm -f $(TARGET) $(TARGET).exe $(RESOBJ)
rm -f $(TARGET) $(TARGET).exe
.PHONY: clean

View File

@ -1,13 +1,12 @@
TARGET = megaglest_shim
GAME_LAUNCH_NAME = megaglest.exe
GAME_LAUNCH_NAME = megaglest
!ifndef STEAMWORKS
# STEAMWORKS = /home/softcoder/Code/steamworks_sdk/sdk
# STEAMWORKS = ..\..\..\steamworks_sdk\sdk
!error STEAMWORKS is not set
!endif
# CXX = cl.exe /O2 /DNDEBUG
# WINDRES = windres
LNK = link.exe
FLAGS = /I $(STEAMWORKS)\public -DGAME_LAUNCH_NAME=\"$(GAME_LAUNCH_NAME)\"
# LIB_PATH = "/LIBPATH:$(STEAMWORKS)\redistributable_bin" /VERBOSE:LIB
@ -16,12 +15,8 @@ LIBS = steam_api.lib gdi32.lib user32.lib
!if "$(DEBUG)" == "1"
FLAGS = $(FLAGS) -DSTEAMSHIM_DEBUG
!else
FLAGS = $(FLAGS) -mwindows
!endif
SRC = steamshim_parent.cpp
.PHONY : clean all
all : app
@ -32,5 +27,5 @@ steamshim_parent.obj: steamshim_parent.cpp
$(CXX) /MT $(CXXFLAGS) $(FLAGS) /c steamshim_parent.cpp /Fosteamshim_parent.obj
clean:
@-erase $(TARGET).obj
@-erase steamshim_parent.obj
@-erase $(TARGET).exe

View File

@ -3,7 +3,6 @@
rem change to the directory of this batch file
rem SET VCVARS_PLATFORM=x86_amd64
SET VCVARS_PLATFORM=
SET MSBUILD_CONFIG=Release
ECHO --------------------------------
@ -53,8 +52,8 @@ ECHO --------------------------------
Echo Building MegaGlest using Visual Studio 2015...
set CL=/MP
del steamshim_parent.obj
del megaglest_shim.exe
IF EXIST "steamshim_parent.obj" del steamshim_parent.obj
IF EXIST "megaglest_shim.exe" del megaglest_shim.exe
rem set VisualStudioVersion=11.0
set msBuildMaxCPU=
@ -68,7 +67,7 @@ ECHO Found CPU Count [%NUMBER_OF_PROCESSORS%]
SET MSBUILD_PATH_MG_x64="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V140\\"
echo Doing a FULL REBUILD...
nmake /f Makefile.win STEAMWORKS=c:\Code\steamworks_sdk\sdk
nmake /f Makefile.win STEAMWORKS=..\..\..\steamworks_sdk\sdk
ECHO ... End.
rem pause execution so we can see the output before the batch file exits

View File

@ -1,10 +1,11 @@
#!/bin/bash
# Use this script to build MegaGlest using cmake
# Use this script to build MegaGlest Steam Shim using make
# ----------------------------------------------------------------------------
# Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
# Copyright (c) 2011-2013 Mark Vejvoda under GNU GPL v3.0+
# ----------------------------------------------------------------------------
rm steamshim
rm megaglest_shim
rm megaglest
#make STEAMWORKS?=/home/softcoder/Code/steamworks_sdk/sdk
make $@