mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
OMakeでPC上のテストをビルドできるように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@556 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
9339091b25
commit
996e08dfd4
@ -0,0 +1 @@
|
|||||||
|
.SUBDIRS: RegionIdModifier
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
########################################################################
|
||||||
|
# Permission is hereby granted, free of charge, to any person
|
||||||
|
# obtaining a copy of this file, to deal in the File without
|
||||||
|
# restriction, including without limitation the rights to use,
|
||||||
|
# copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
# sell copies of the File, and to permit persons to whom the
|
||||||
|
# File is furnished to do so, subject to the following condition:
|
||||||
|
#
|
||||||
|
# THE FILE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE FILE OR
|
||||||
|
# THE USE OR OTHER DEALINGS IN THE FILE.
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# The standard OMakeroot file.
|
||||||
|
# You will not normally need to modify this file.
|
||||||
|
# By default, your changes should be placed in the
|
||||||
|
# OMakefile in this directory.
|
||||||
|
#
|
||||||
|
# If you decide to modify this file, note that it uses exactly
|
||||||
|
# the same syntax as the OMakefile.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Include the standard installed configuration files.
|
||||||
|
# Any of these can be deleted if you are not using them,
|
||||||
|
# but you probably want to keep the Common file.
|
||||||
|
#
|
||||||
|
OSTYPE = Cygwin
|
||||||
|
open build/C
|
||||||
|
|
||||||
|
#
|
||||||
|
# The command-line variables are defined *after* the
|
||||||
|
# standard configuration has been loaded.
|
||||||
|
#
|
||||||
|
DefineCommandVars()
|
||||||
|
|
||||||
|
# ビルド共通設定
|
||||||
|
CXX = g++-4
|
||||||
|
LDFLAGS += -L/usr/local/lib -lgtest -lgtest_main
|
||||||
|
|
||||||
|
#
|
||||||
|
# Include the OMakefile in this directory.
|
||||||
|
#
|
||||||
|
.SUBDIRS: .
|
||||||
@ -1,27 +0,0 @@
|
|||||||
#外のディレクトリにあるので個別に記述
|
|
||||||
EXTERNAL_SRC = ../../../ConsoleRestore/RegionIdModifier.cpp
|
|
||||||
EXTERNAL_OBJ = $(notdir $(EXTERNAL_SRC:.cpp=.o))
|
|
||||||
|
|
||||||
SRC = testRegionIdModifier.cpp testUtil.cpp
|
|
||||||
OBJ = $(SRC:.cpp=.o) $(EXTERNAL_OBJ)
|
|
||||||
INCLUDE_DIRECTORY = -I../../../ConsoleRestore -I./
|
|
||||||
LIBS = -lgtest -lgtest_main
|
|
||||||
#googletestのインストール先
|
|
||||||
GTEST_LIB_DIRECTORY = -L/usr/local/lib
|
|
||||||
GCC = g++
|
|
||||||
TARGET = testRegionIdModifier
|
|
||||||
|
|
||||||
$(TARGET).exe: $(OBJ)
|
|
||||||
$(GCC) -o $@ $(OBJ) $(INCLUDE_DIRECTORY) $(LIBS) $(GTEST_LIB_DIRECTORY)
|
|
||||||
|
|
||||||
$(EXTERNAL_OBJ):
|
|
||||||
$(GCC) -c $(EXTERNAL_SRC) $(INCLUDE_DIRECTORY)
|
|
||||||
|
|
||||||
.cpp.o:
|
|
||||||
$(GCC) -c $< $(INCLUDE_DIRECTORY)
|
|
||||||
|
|
||||||
test: $(TARGET).exe
|
|
||||||
./$(TARGET).exe
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf *.exe *.o
|
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
INCLUDES[] +=
|
||||||
|
./
|
||||||
|
../../../ConsoleRestore
|
||||||
|
|
||||||
|
TARGET = testRegionIdModifier
|
||||||
|
|
||||||
|
SRC_FILES[] =
|
||||||
|
testRegionIdModifier
|
||||||
|
testUtil
|
||||||
|
RegionIdModifier
|
||||||
|
|
||||||
|
# テストディレクトリ外にあるので独自ルールでビルド
|
||||||
|
RegionIdModifier$(EXT_OBJ): ../../../ConsoleRestore/RegionIdModifier.cpp
|
||||||
|
$(CXX) $(PREFIXED_INCLUDES) -c $<
|
||||||
|
|
||||||
|
.DEFAULT: RegionIdModifier$(EXT_OBJ) $(TARGET)$(EXE)
|
||||||
|
|
||||||
|
CXXProgram(testRegionIdModifier, $(SRC_FILES))
|
||||||
|
|
||||||
|
.PHONY: clean test
|
||||||
|
clean:
|
||||||
|
rm -rf *$(EXT_OBJ) *$(EXE)
|
||||||
|
|
||||||
|
test: $(TARGET)$(EXE)
|
||||||
|
$<
|
||||||
Loading…
Reference in New Issue
Block a user