From 6e19bb560d474736d45f5be011ff0830c7019991 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Mon, 5 Nov 2018 23:34:00 +0200 Subject: Squashed 'spasm/' content from commit 08ee95d git-subtree-dir: spasm git-subtree-split: 08ee95d89054ba0d33697d613799a0a013aedf89 --- solution/Makefile | 46 ++++++++++ solution/genie.lua | 54 +++++++++++ solution/spasm.make | 197 +++++++++++++++++++++++++++++++++++++++++ solution/spasm.sln | 37 ++++++++ solution/spasm.vcxproj | 133 ++++++++++++++++++++++++++++ solution/spasm.vcxproj.filters | 34 +++++++ solution/spasm.vcxproj.user | 11 +++ solution/sprt.make | 178 +++++++++++++++++++++++++++++++++++++ solution/sprt.vcxproj | 125 ++++++++++++++++++++++++++ solution/sprt.vcxproj.filters | 19 ++++ solution/sprt.vcxproj.user | 11 +++ solution/sprun.make | 161 +++++++++++++++++++++++++++++++++ solution/sprun.vcxproj | 126 ++++++++++++++++++++++++++ solution/sprun.vcxproj.filters | 13 +++ solution/sprun.vcxproj.user | 11 +++ 15 files changed, 1156 insertions(+) create mode 100644 solution/Makefile create mode 100644 solution/genie.lua create mode 100644 solution/spasm.make create mode 100644 solution/spasm.sln create mode 100644 solution/spasm.vcxproj create mode 100644 solution/spasm.vcxproj.filters create mode 100644 solution/spasm.vcxproj.user create mode 100644 solution/sprt.make create mode 100644 solution/sprt.vcxproj create mode 100644 solution/sprt.vcxproj.filters create mode 100644 solution/sprt.vcxproj.user create mode 100644 solution/sprun.make create mode 100644 solution/sprun.vcxproj create mode 100644 solution/sprun.vcxproj.filters create mode 100644 solution/sprun.vcxproj.user (limited to 'solution') diff --git a/solution/Makefile b/solution/Makefile new file mode 100644 index 0000000..665d251 --- /dev/null +++ b/solution/Makefile @@ -0,0 +1,46 @@ +# GNU Make solution makefile autogenerated by GENie +# Type "make help" for usage help + +ifndef config + config=debug64 +endif +export config + +PROJECTS := spasm sprt sprun + +.PHONY: all clean help $(PROJECTS) + +all: $(PROJECTS) + +sprt: + @echo "==== Building sprt ($(config)) ====" + @${MAKE} --no-print-directory -C . -f sprt.make + +spasm: + @echo "==== Building spasm ($(config)) ====" + @${MAKE} --no-print-directory -C . -f spasm.make + +sprun: sprt + @echo "==== Building sprun ($(config)) ====" + @${MAKE} --no-print-directory -C . -f sprun.make + +clean: + @${MAKE} --no-print-directory -C . -f sprt.make clean + @${MAKE} --no-print-directory -C . -f spasm.make clean + @${MAKE} --no-print-directory -C . -f sprun.make clean + +help: + @echo "Usage: make [config=name] [target]" + @echo "" + @echo "CONFIGURATIONS:" + @echo " debug64" + @echo " release64" + @echo "" + @echo "TARGETS:" + @echo " all (default)" + @echo " clean" + @echo " sprt" + @echo " spasm" + @echo " sprun" + @echo "" + @echo "For more information, see https://github.com/bkaradzic/genie" diff --git a/solution/genie.lua b/solution/genie.lua new file mode 100644 index 0000000..b3bb00f --- /dev/null +++ b/solution/genie.lua @@ -0,0 +1,54 @@ +solution 'spasm' + configurations {'Debug', 'Release'} + platforms { 'x64' } + flags { + 'FatalWarnings', + 'ExtraWarnings', + 'Cpp14', + 'Symbols', + } + + defines { + '_SCL_SECURE_NO_WARNINGS', + } + + local root = '../build/' + + configuration 'Debug' + targetdir(root .. 'bin/Debug') + objdir(root .. 'obj/Debug') + + configuration 'Release' + flags 'OptimizeSpeed' + targetdir(root .. 'bin/Release') + objdir(root .. 'obj/Release') + configuration '*' + + project 'sprt' + kind 'StaticLib' + language 'C++' + uuid(os.uuid('sprt')) + files '../src/*.cpp' + removefiles '../src/main.cpp' + files '../src/*.h' + + project 'spasm' + kind 'ConsoleApp' + language 'C++' + uuid(os.uuid('spasm')) + files '../src/asm/*.cpp' + removefiles { + '../src/asm/lexdump.cpp', + '../src/asm/lexdump3.cpp', + } + files '../src/asm/*.h' + + project 'sprun' + kind 'ConsoleApp' + language 'C++' + uuid(os.uuid('sprun')) + files '../src/main.cpp' + links 'sprt' + + -- include '../test' + startproject 'sprun' diff --git a/solution/spasm.make b/solution/spasm.make new file mode 100644 index 0000000..4d90252 --- /dev/null +++ b/solution/spasm.make @@ -0,0 +1,197 @@ +# GNU Make project makefile autogenerated by GENie +ifndef config + config=debug64 +endif + +ifndef verbose + SILENT = @ +endif + +SHELLTYPE := msdos +ifeq (,$(ComSpec)$(COMSPEC)) + SHELLTYPE := posix +endif +ifeq (/bin,$(findstring /bin,$(SHELL))) + SHELLTYPE := posix +endif +ifeq (/bin,$(findstring /bin,$(MAKESHELL))) + SHELLTYPE := posix +endif + +ifeq (posix,$(SHELLTYPE)) + MKDIR = $(SILENT) mkdir -p "$(1)" + COPY = $(SILENT) cp -fR "$(1)" "$(2)" + RM = $(SILENT) rm -f "$(1)" +else + MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0 + COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))" + RM = $(SILENT) del /F "$(subst /,\\,$(1))" 2> nul || exit 0 +endif + +CC = gcc +CXX = g++ +AR = ar + +ifndef RESCOMP + ifdef WINDRES + RESCOMP = $(WINDRES) + else + RESCOMP = windres + endif +endif + +MAKEFILE = spasm.make + +ifeq ($(config),debug64) + OBJDIR = ../build/obj/Debug/x64/Debug/spasm + TARGETDIR = ../build/bin/Debug + TARGET = $(TARGETDIR)/spasm + DEFINES += -D_SCL_SECURE_NO_WARNINGS + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) + ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 + ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) + ALL_LDFLAGS += $(LDFLAGS) -m64 + LDDEPS += + LIBS += $(LDDEPS) + EXTERNAL_LIBS += + LINKOBJS = $(OBJECTS) + LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + OBJECTS := \ + $(OBJDIR)/src/asm/assembler.o \ + $(OBJDIR)/src/asm/bytecode.o \ + $(OBJDIR)/src/asm/lexer.o \ + $(OBJDIR)/src/asm/main.o \ + $(OBJDIR)/src/asm/symbol.o \ + $(OBJDIR)/src/asm/token.o \ + $(OBJDIR)/src/asm/tokenizer.o \ + + define PREBUILDCMDS + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +ifeq ($(config),release64) + OBJDIR = ../build/obj/Release/x64/Release/spasm + TARGETDIR = ../build/bin/Release + TARGET = $(TARGETDIR)/spasm + DEFINES += -D_SCL_SECURE_NO_WARNINGS + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) + ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 + ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) + ALL_LDFLAGS += $(LDFLAGS) -m64 + LDDEPS += + LIBS += $(LDDEPS) + EXTERNAL_LIBS += + LINKOBJS = $(OBJECTS) + LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + OBJECTS := \ + $(OBJDIR)/src/asm/assembler.o \ + $(OBJDIR)/src/asm/bytecode.o \ + $(OBJDIR)/src/asm/lexer.o \ + $(OBJDIR)/src/asm/main.o \ + $(OBJDIR)/src/asm/symbol.o \ + $(OBJDIR)/src/asm/token.o \ + $(OBJDIR)/src/asm/tokenizer.o \ + + define PREBUILDCMDS + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +OBJDIRS := \ + $(OBJDIR) \ + $(OBJDIR)/src/asm \ + +RESOURCES := \ + +.PHONY: clean prebuild prelink + +all: $(OBJDIRS) $(TARGETDIR) prebuild prelink $(TARGET) + @: + +$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS) + @echo Linking spasm + $(SILENT) $(LINKCMD) + $(POSTBUILDCMDS) + +$(TARGETDIR): + @echo Creating $(TARGETDIR) + -$(call MKDIR,$(TARGETDIR)) + +$(OBJDIRS): + @echo Creating $(@) + -$(call MKDIR,$@) + +clean: + @echo Cleaning spasm +ifeq (posix,$(SHELLTYPE)) + $(SILENT) rm -f $(TARGET) + $(SILENT) rm -rf $(OBJDIR) +else + $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) + $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) +endif + +prebuild: + $(PREBUILDCMDS) + +prelink: + $(PRELINKCMDS) + +ifneq (,$(PCH)) +$(GCH): $(PCH) $(MAKEFILE) | $(OBJDIR) + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) -x c++-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" + +$(GCH_OBJC): $(PCH) $(MAKEFILE) | $(OBJDIR) + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_OBJCPPFLAGS) -x objective-c++-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" +endif + +$(OBJDIR)/src/asm/assembler.o: ../src/asm/assembler.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src/asm + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +$(OBJDIR)/src/asm/bytecode.o: ../src/asm/bytecode.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src/asm + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +$(OBJDIR)/src/asm/lexer.o: ../src/asm/lexer.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src/asm + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +$(OBJDIR)/src/asm/main.o: ../src/asm/main.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src/asm + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +$(OBJDIR)/src/asm/symbol.o: ../src/asm/symbol.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src/asm + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +$(OBJDIR)/src/asm/token.o: ../src/asm/token.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src/asm + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +$(OBJDIR)/src/asm/tokenizer.o: ../src/asm/tokenizer.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src/asm + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +-include $(OBJECTS:%.o=%.d) +ifneq (,$(PCH)) + -include $(OBJDIR)/$(notdir $(PCH)).d + -include $(OBJDIR)/$(notdir $(PCH))_objc.d +endif diff --git a/solution/spasm.sln b/solution/spasm.sln new file mode 100644 index 0000000..1f36001 --- /dev/null +++ b/solution/spasm.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sprun", "sprun.vcxproj", "{FD605F10-6975-87C1-32F7-2A219ECA83F2}" + ProjectSection(ProjectDependencies) = postProject + {AE0A9E7C-9A41-9F0D-432E-85102F441B0F} = {AE0A9E7C-9A41-9F0D-432E-85102F441B0F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sprt", "sprt.vcxproj", "{AE0A9E7C-9A41-9F0D-432E-85102F441B0F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spasm", "spasm.vcxproj", "{69185F10-D52C-87C1-9EAE-2A210A8283F2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FD605F10-6975-87C1-32F7-2A219ECA83F2}.Debug|x64.ActiveCfg = Debug|x64 + {FD605F10-6975-87C1-32F7-2A219ECA83F2}.Debug|x64.Build.0 = Debug|x64 + {FD605F10-6975-87C1-32F7-2A219ECA83F2}.Release|x64.ActiveCfg = Release|x64 + {FD605F10-6975-87C1-32F7-2A219ECA83F2}.Release|x64.Build.0 = Release|x64 + {AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Debug|x64.ActiveCfg = Debug|x64 + {AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Debug|x64.Build.0 = Debug|x64 + {AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Release|x64.ActiveCfg = Release|x64 + {AE0A9E7C-9A41-9F0D-432E-85102F441B0F}.Release|x64.Build.0 = Release|x64 + {69185F10-D52C-87C1-9EAE-2A210A8283F2}.Debug|x64.ActiveCfg = Debug|x64 + {69185F10-D52C-87C1-9EAE-2A210A8283F2}.Debug|x64.Build.0 = Debug|x64 + {69185F10-D52C-87C1-9EAE-2A210A8283F2}.Release|x64.ActiveCfg = Release|x64 + {69185F10-D52C-87C1-9EAE-2A210A8283F2}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + EndGlobalSection +EndGlobal diff --git a/solution/spasm.vcxproj b/solution/spasm.vcxproj new file mode 100644 index 0000000..801feb8 --- /dev/null +++ b/solution/spasm.vcxproj @@ -0,0 +1,133 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {69185F10-D52C-87C1-9EAE-2A210A8283F2} + spasm + 8.1 + Win32Proj + + + + Application + true + v140 + x64 + + + Application + false + v140 + x64 + + + + + + + + + + + + + ..\build\bin\Debug\ + ..\build\obj\Debug\x64\Debug\spasm\ + spasm + .exe + true + + + ..\build\bin\Release\ + ..\build\obj\Release\x64\Release\spasm\ + spasm + .exe + false + + + + %(AdditionalOptions) + Disabled + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + true + true + + Level4 + true + EditAndContinue + $(IntDir)spasm.compile.pdb + + + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + Console + true + $(OutDir)spasm.pdb + $(OutDir)spasm.exe + mainCRTStartup + MachineX64 + + + + + %(AdditionalOptions) + MaxSpeed + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + true + MultiThreadedDLL + true + true + + Level4 + true + ProgramDatabase + $(IntDir)spasm.compile.pdb + + + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + Console + true + $(OutDir)spasm.pdb + true + true + $(OutDir)spasm.exe + mainCRTStartup + MachineX64 + + + + + + + + + + + + + + + + + + + + + + diff --git a/solution/spasm.vcxproj.filters b/solution/spasm.vcxproj.filters new file mode 100644 index 0000000..77f6487 --- /dev/null +++ b/solution/spasm.vcxproj.filters @@ -0,0 +1,34 @@ + + + + + {2DAB880B-99B4-887C-2230-9F7C8E38947C} + + + {6A9848A9-D677-C744-DF8F-521B4BEE2DA6} + + + + + src\asm + + + src\asm + + + src\asm + + + src\asm + + + src\asm + + + src\asm + + + src\asm + + + diff --git a/solution/spasm.vcxproj.user b/solution/spasm.vcxproj.user new file mode 100644 index 0000000..99820f1 --- /dev/null +++ b/solution/spasm.vcxproj.user @@ -0,0 +1,11 @@ + + + + WindowsLocalDebugger + + + + WindowsLocalDebugger + + + diff --git a/solution/sprt.make b/solution/sprt.make new file mode 100644 index 0000000..8d85739 --- /dev/null +++ b/solution/sprt.make @@ -0,0 +1,178 @@ +# GNU Make project makefile autogenerated by GENie +ifndef config + config=debug64 +endif + +ifndef verbose + SILENT = @ +endif + +SHELLTYPE := msdos +ifeq (,$(ComSpec)$(COMSPEC)) + SHELLTYPE := posix +endif +ifeq (/bin,$(findstring /bin,$(SHELL))) + SHELLTYPE := posix +endif +ifeq (/bin,$(findstring /bin,$(MAKESHELL))) + SHELLTYPE := posix +endif + +ifeq (posix,$(SHELLTYPE)) + MKDIR = $(SILENT) mkdir -p "$(1)" + COPY = $(SILENT) cp -fR "$(1)" "$(2)" + RM = $(SILENT) rm -f "$(1)" +else + MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0 + COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))" + RM = $(SILENT) del /F "$(subst /,\\,$(1))" 2> nul || exit 0 +endif + +CC = gcc +CXX = g++ +AR = ar + +ifndef RESCOMP + ifdef WINDRES + RESCOMP = $(WINDRES) + else + RESCOMP = windres + endif +endif + +MAKEFILE = sprt.make + +ifeq ($(config),debug64) + OBJDIR = ../build/obj/Debug/x64/Debug/sprt + TARGETDIR = ../build/bin/Debug + TARGET = $(TARGETDIR)/libsprt.a + DEFINES += -D_SCL_SECURE_NO_WARNINGS + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) + ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 + ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) + ALL_LDFLAGS += $(LDFLAGS) -m64 + LDDEPS += + LIBS += $(LDDEPS) + EXTERNAL_LIBS += + LINKOBJS = $(OBJECTS) + LINKCMD = $(AR) -rcs $(TARGET) + OBJECTS := \ + $(OBJDIR)/src/dstack.o \ + $(OBJDIR)/src/frames.o \ + $(OBJDIR)/src/spasm.o \ + + define PREBUILDCMDS + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +ifeq ($(config),release64) + OBJDIR = ../build/obj/Release/x64/Release/sprt + TARGETDIR = ../build/bin/Release + TARGET = $(TARGETDIR)/libsprt.a + DEFINES += -D_SCL_SECURE_NO_WARNINGS + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) + ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 + ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) + ALL_LDFLAGS += $(LDFLAGS) -m64 + LDDEPS += + LIBS += $(LDDEPS) + EXTERNAL_LIBS += + LINKOBJS = $(OBJECTS) + LINKCMD = $(AR) -rcs $(TARGET) + OBJECTS := \ + $(OBJDIR)/src/dstack.o \ + $(OBJDIR)/src/frames.o \ + $(OBJDIR)/src/spasm.o \ + + define PREBUILDCMDS + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +OBJDIRS := \ + $(OBJDIR) \ + $(OBJDIR)/src \ + +RESOURCES := \ + +.PHONY: clean prebuild prelink + +all: $(OBJDIRS) $(TARGETDIR) prebuild prelink $(TARGET) + @: + +$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS) + @echo Archiving sprt +ifeq (posix,$(SHELLTYPE)) + $(SILENT) rm -f $(TARGET) +else + $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) +endif + $(SILENT) $(LINKCMD) $(LINKOBJS) + $(POSTBUILDCMDS) + +$(TARGETDIR): + @echo Creating $(TARGETDIR) + -$(call MKDIR,$(TARGETDIR)) + +$(OBJDIRS): + @echo Creating $(@) + -$(call MKDIR,$@) + +clean: + @echo Cleaning sprt +ifeq (posix,$(SHELLTYPE)) + $(SILENT) rm -f $(TARGET) + $(SILENT) rm -rf $(OBJDIR) +else + $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) + $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) +endif + +prebuild: + $(PREBUILDCMDS) + +prelink: + $(PRELINKCMDS) + +ifneq (,$(PCH)) +$(GCH): $(PCH) $(MAKEFILE) | $(OBJDIR) + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) -x c++-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" + +$(GCH_OBJC): $(PCH) $(MAKEFILE) | $(OBJDIR) + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_OBJCPPFLAGS) -x objective-c++-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" +endif + +$(OBJDIR)/src/dstack.o: ../src/dstack.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +$(OBJDIR)/src/frames.o: ../src/frames.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +$(OBJDIR)/src/spasm.o: ../src/spasm.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +-include $(OBJECTS:%.o=%.d) +ifneq (,$(PCH)) + -include $(OBJDIR)/$(notdir $(PCH)).d + -include $(OBJDIR)/$(notdir $(PCH))_objc.d +endif diff --git a/solution/sprt.vcxproj b/solution/sprt.vcxproj new file mode 100644 index 0000000..760d501 --- /dev/null +++ b/solution/sprt.vcxproj @@ -0,0 +1,125 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {AE0A9E7C-9A41-9F0D-432E-85102F441B0F} + sprt + 8.1 + Win32Proj + + + + StaticLibrary + true + v140 + x64 + + + StaticLibrary + false + v140 + x64 + + + + + + + + + + + + + ..\build\bin\Debug\ + ..\build\obj\Debug\x64\Debug\sprt\ + sprt + .lib + + + ..\build\bin\Release\ + ..\build\obj\Release\x64\Release\sprt\ + sprt + .lib + + + + %(AdditionalOptions) + Disabled + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + true + true + + Level4 + true + EditAndContinue + $(OutDir)sprt.pdb + + + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + $(OutDir)sprt.lib + MachineX64 + + + Windows + true + $(OutDir)sprt.pdb + + + + + %(AdditionalOptions) + MaxSpeed + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + true + MultiThreadedDLL + true + true + + Level4 + true + ProgramDatabase + $(OutDir)sprt.pdb + + + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + $(OutDir)sprt.lib + MachineX64 + + + Windows + true + $(OutDir)sprt.pdb + true + true + + + + + + + + + + + + + + diff --git a/solution/sprt.vcxproj.filters b/solution/sprt.vcxproj.filters new file mode 100644 index 0000000..c111a28 --- /dev/null +++ b/solution/sprt.vcxproj.filters @@ -0,0 +1,19 @@ + + + + + {2DAB880B-99B4-887C-2230-9F7C8E38947C} + + + + + src + + + src + + + src + + + diff --git a/solution/sprt.vcxproj.user b/solution/sprt.vcxproj.user new file mode 100644 index 0000000..99820f1 --- /dev/null +++ b/solution/sprt.vcxproj.user @@ -0,0 +1,11 @@ + + + + WindowsLocalDebugger + + + + WindowsLocalDebugger + + + diff --git a/solution/sprun.make b/solution/sprun.make new file mode 100644 index 0000000..7b9be59 --- /dev/null +++ b/solution/sprun.make @@ -0,0 +1,161 @@ +# GNU Make project makefile autogenerated by GENie +ifndef config + config=debug64 +endif + +ifndef verbose + SILENT = @ +endif + +SHELLTYPE := msdos +ifeq (,$(ComSpec)$(COMSPEC)) + SHELLTYPE := posix +endif +ifeq (/bin,$(findstring /bin,$(SHELL))) + SHELLTYPE := posix +endif +ifeq (/bin,$(findstring /bin,$(MAKESHELL))) + SHELLTYPE := posix +endif + +ifeq (posix,$(SHELLTYPE)) + MKDIR = $(SILENT) mkdir -p "$(1)" + COPY = $(SILENT) cp -fR "$(1)" "$(2)" + RM = $(SILENT) rm -f "$(1)" +else + MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0 + COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))" + RM = $(SILENT) del /F "$(subst /,\\,$(1))" 2> nul || exit 0 +endif + +CC = gcc +CXX = g++ +AR = ar + +ifndef RESCOMP + ifdef WINDRES + RESCOMP = $(WINDRES) + else + RESCOMP = windres + endif +endif + +MAKEFILE = sprun.make + +ifeq ($(config),debug64) + OBJDIR = ../build/obj/Debug/x64/Debug/sprun + TARGETDIR = ../build/bin/Debug + TARGET = $(TARGETDIR)/sprun + DEFINES += -D_SCL_SECURE_NO_WARNINGS + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) + ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 + ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -m64 -std=c++14 + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) + ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Debug" -m64 + LDDEPS += ../build/bin/Debug/libsprt.a + LIBS += $(LDDEPS) + EXTERNAL_LIBS += + LINKOBJS = $(OBJECTS) + LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + OBJECTS := \ + $(OBJDIR)/src/main.o \ + + define PREBUILDCMDS + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +ifeq ($(config),release64) + OBJDIR = ../build/obj/Release/x64/Release/sprun + TARGETDIR = ../build/bin/Release + TARGET = $(TARGETDIR)/sprun + DEFINES += -D_SCL_SECURE_NO_WARNINGS + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES) + ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 + ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 + ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 + ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Werror -Wall -Wextra -g -O3 -m64 -std=c++14 + ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) + ALL_LDFLAGS += $(LDFLAGS) -L"../build/bin/Release" -m64 + LDDEPS += ../build/bin/Release/libsprt.a + LIBS += $(LDDEPS) + EXTERNAL_LIBS += + LINKOBJS = $(OBJECTS) + LINKCMD = $(CXX) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS) + OBJECTS := \ + $(OBJDIR)/src/main.o \ + + define PREBUILDCMDS + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +OBJDIRS := \ + $(OBJDIR) \ + $(OBJDIR)/src \ + +RESOURCES := \ + +.PHONY: clean prebuild prelink + +all: $(OBJDIRS) $(TARGETDIR) prebuild prelink $(TARGET) + @: + +$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS) + @echo Linking sprun + $(SILENT) $(LINKCMD) + $(POSTBUILDCMDS) + +$(TARGETDIR): + @echo Creating $(TARGETDIR) + -$(call MKDIR,$(TARGETDIR)) + +$(OBJDIRS): + @echo Creating $(@) + -$(call MKDIR,$@) + +clean: + @echo Cleaning sprun +ifeq (posix,$(SHELLTYPE)) + $(SILENT) rm -f $(TARGET) + $(SILENT) rm -rf $(OBJDIR) +else + $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) + $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) +endif + +prebuild: + $(PREBUILDCMDS) + +prelink: + $(PRELINKCMDS) + +ifneq (,$(PCH)) +$(GCH): $(PCH) $(MAKEFILE) | $(OBJDIR) + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) -x c++-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" + +$(GCH_OBJC): $(PCH) $(MAKEFILE) | $(OBJDIR) + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_OBJCPPFLAGS) -x objective-c++-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<" +endif + +$(OBJDIR)/src/main.o: ../src/main.cpp $(GCH) $(MAKEFILE) | $(OBJDIR)/src + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<" + +-include $(OBJECTS:%.o=%.d) +ifneq (,$(PCH)) + -include $(OBJDIR)/$(notdir $(PCH)).d + -include $(OBJDIR)/$(notdir $(PCH))_objc.d +endif diff --git a/solution/sprun.vcxproj b/solution/sprun.vcxproj new file mode 100644 index 0000000..08ee433 --- /dev/null +++ b/solution/sprun.vcxproj @@ -0,0 +1,126 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {FD605F10-6975-87C1-32F7-2A219ECA83F2} + sprun + 8.1 + Win32Proj + + + + Application + true + v140 + x64 + + + Application + false + v140 + x64 + + + + + + + + + + + + + ..\build\bin\Debug\ + ..\build\obj\Debug\x64\Debug\sprun\ + sprun + .exe + true + + + ..\build\bin\Release\ + ..\build\obj\Release\x64\Release\sprun\ + sprun + .exe + false + + + + %(AdditionalOptions) + Disabled + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + true + true + + Level4 + true + EditAndContinue + $(IntDir)sprun.compile.pdb + + + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + Console + true + $(OutDir)sprun.pdb + $(OutDir)sprun.exe + mainCRTStartup + MachineX64 + + + + + %(AdditionalOptions) + MaxSpeed + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + true + MultiThreadedDLL + true + true + + Level4 + true + ProgramDatabase + $(IntDir)sprun.compile.pdb + + + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + Console + true + $(OutDir)sprun.pdb + true + true + $(OutDir)sprun.exe + mainCRTStartup + MachineX64 + + + + + + + + + {AE0A9E7C-9A41-9F0D-432E-85102F441B0F} + + + + + + diff --git a/solution/sprun.vcxproj.filters b/solution/sprun.vcxproj.filters new file mode 100644 index 0000000..daeea8c --- /dev/null +++ b/solution/sprun.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {2DAB880B-99B4-887C-2230-9F7C8E38947C} + + + + + src + + + diff --git a/solution/sprun.vcxproj.user b/solution/sprun.vcxproj.user new file mode 100644 index 0000000..99820f1 --- /dev/null +++ b/solution/sprun.vcxproj.user @@ -0,0 +1,11 @@ + + + + WindowsLocalDebugger + + + + WindowsLocalDebugger + + + -- cgit v1.3.1-23-gd82d