From 97a89d0bb0a83787df3f3aaceea1e257e3a5395a Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Mon, 25 Sep 2017 18:55:35 -0700 Subject: [PATCH] - cleanup makefiles --- source/steamshim_parent/Makefile | 16 +++++++++------- source/steamshim_parent/Makefile.win | 11 +++-------- source/steamshim_parent/build.bat | 7 +++---- source/steamshim_parent/build.sh | 5 +++-- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/source/steamshim_parent/Makefile b/source/steamshim_parent/Makefile index fa268242..bcd3e197 100644 --- a/source/steamshim_parent/Makefile +++ b/source/steamshim_parent/Makefile @@ -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 diff --git a/source/steamshim_parent/Makefile.win b/source/steamshim_parent/Makefile.win index aed1cded..07ebfd03 100644 --- a/source/steamshim_parent/Makefile.win +++ b/source/steamshim_parent/Makefile.win @@ -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 diff --git a/source/steamshim_parent/build.bat b/source/steamshim_parent/build.bat index 6b8a98d0..569234ae 100644 --- a/source/steamshim_parent/build.bat +++ b/source/steamshim_parent/build.bat @@ -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 diff --git a/source/steamshim_parent/build.sh b/source/steamshim_parent/build.sh index 0954a45c..9a51d0a3 100755 --- a/source/steamshim_parent/build.sh +++ b/source/steamshim_parent/build.sh @@ -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 # 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 $@