diff options
author | starkos <none@none> | 2008-04-10 00:02:25 +0400 |
---|---|---|
committer | starkos <none@none> | 2008-04-10 00:02:25 +0400 |
commit | 45611247b6bbba2863eba0b5f69a369338c5f2f1 (patch) | |
tree | a3d703804df31ef7fead9970b2742e14194a86ac /samples | |
parent | 6e54d256b95f04900898f1824ce4551554bfae13 (diff) |
Merged with dev branch: generation of stub solution files for VS and gmake (r292:300)
Diffstat (limited to 'samples')
-rw-r--r-- | samples/gmake/CppExe/Makefile | 90 | ||||
-rw-r--r-- | samples/gmake/Makefile | 24 | ||||
-rw-r--r-- | samples/vs2003/EmptySolution.sln | 11 | ||||
-rw-r--r-- | samples/vs2005/EmptySolution.sln | 8 |
4 files changed, 133 insertions, 0 deletions
diff --git a/samples/gmake/CppExe/Makefile b/samples/gmake/CppExe/Makefile new file mode 100644 index 0000000..ee1101a --- /dev/null +++ b/samples/gmake/CppExe/Makefile @@ -0,0 +1,90 @@ +# GNU Makefile autogenerated by Premake
+# Please build using the solution Makefile at:
+# ../Makefile
+
+ifndef CONFIG
+ CONFIG=Debug
+endif
+
+ifeq ($(CONFIG),Debug)
+ BINDIR := ..
+ LIBDIR := ..
+ OBJDIR := obj/Debug
+ OUTDIR := ..
+ CPPFLAGS := -MMD
+ CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g
+ CXXFLAGS := $(CFLAGS)
+ LDFLAGS += -L$(BINDIR) -L$(LIBDIR)
+ LDDEPS :=
+ RESFLAGS :=
+ TARGET := CppExe.exe
+ BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
+endif
+
+ifeq ($(CONFIG),Release)
+ BINDIR := ..
+ LIBDIR := ..
+ OBJDIR := obj/Release
+ OUTDIR := ..
+ CPPFLAGS := -MMD
+ CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O2
+ CXXFLAGS := $(CFLAGS)
+ LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -s
+ LDDEPS :=
+ RESFLAGS :=
+ TARGET := CppExe.exe
+ BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
+endif
+
+OBJECTS := \
+ $(OBJDIR)/Hello.o \
+
+RESOURCES := \
+
+MKDIR_TYPE := msdos
+CMD := $(subst \,\\,$(ComSpec)$(COMSPEC))
+ifeq (,$(CMD))
+ MKDIR_TYPE := posix
+endif
+ifeq (/bin/sh.exe,$(SHELL))
+ MKDIR_TYPE := posix
+endif
+ifeq ($(MKDIR_TYPE),posix)
+ CMD_MKBINDIR := mkdir -p $(BINDIR)
+ CMD_MKLIBDIR := mkdir -p $(LIBDIR)
+ CMD_MKOUTDIR := mkdir -p $(OUTDIR)
+ CMD_MKOBJDIR := mkdir -p $(OBJDIR)
+else
+ CMD_MKBINDIR := $(CMD) /c if not exist $(subst /,\\,$(BINDIR)) mkdir $(subst /,\\,$(BINDIR))
+ CMD_MKLIBDIR := $(CMD) /c if not exist $(subst /,\\,$(LIBDIR)) mkdir $(subst /,\\,$(LIBDIR))
+ CMD_MKOUTDIR := $(CMD) /c if not exist $(subst /,\\,$(OUTDIR)) mkdir $(subst /,\\,$(OUTDIR))
+ CMD_MKOBJDIR := $(CMD) /c if not exist $(subst /,\\,$(OBJDIR)) mkdir $(subst /,\\,$(OBJDIR))
+endif
+
+.PHONY: clean
+
+$(OUTDIR)/$(TARGET): $(OBJECTS) $(LDDEPS) $(RESOURCES)
+ @echo Linking CppExe
+ -@$(CMD_MKBINDIR)
+ -@$(CMD_MKLIBDIR)
+ -@$(CMD_MKOUTDIR)
+ @$(BLDCMD)
+
+clean:
+ @echo Cleaning CppExe
+ifeq ($(MKDIR_TYPE),posix)
+ -@rm -f $(OUTDIR)/$(TARGET)
+ -@rm -rf $(OBJDIR)
+else
+ -@if exist $(subst /,\,$(OUTDIR)/$(TARGET)) del /q $(subst /,\,$(OUTDIR)/$(TARGET))
+ -@if exist $(subst /,\,$(OBJDIR)) del /q $(subst /,\,$(OBJDIR))
+ -@if exist $(subst /,\,$(OBJDIR)) rmdir /s /q $(subst /,\,$(OBJDIR))
+endif
+
+$(OBJDIR)/Hello.o: Hello.cpp
+ -@$(CMD_MKOBJDIR)
+ @echo $(notdir $<)
+ @$(CXX) $(CXXFLAGS) -o $@ -c $<
+
+-include $(OBJECTS:%.o=%.d)
+
diff --git a/samples/gmake/Makefile b/samples/gmake/Makefile new file mode 100644 index 0000000..af4ce8d --- /dev/null +++ b/samples/gmake/Makefile @@ -0,0 +1,24 @@ +# GNU Makefile autogenerated by Premake
+# Usage: make [ CONFIG=config_name ]
+# Where {config_name} is one of:
+# Debug, Release
+
+ifndef CONFIG
+ CONFIG=Debug
+endif
+export CONFIG
+
+.PHONY: all clean CppExe
+
+all: CppExe
+
+Makefile: premake.lua CppExe/premake.lua
+ @echo ==== Regenerating Makefiles ====
+ @premake --file $^ --target gnu
+
+CppExe:
+ @echo ==== Building CppExe ====
+ @$(MAKE) --no-print-directory -C CppExe
+
+clean:
+ @$(MAKE) --no-print-directory -C CppExe clean
diff --git a/samples/vs2003/EmptySolution.sln b/samples/vs2003/EmptySolution.sln new file mode 100644 index 0000000..ff0f832 --- /dev/null +++ b/samples/vs2003/EmptySolution.sln @@ -0,0 +1,11 @@ +Microsoft Visual Studio Solution File, Format Version 8.00
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/samples/vs2005/EmptySolution.sln b/samples/vs2005/EmptySolution.sln new file mode 100644 index 0000000..634e232 --- /dev/null +++ b/samples/vs2005/EmptySolution.sln @@ -0,0 +1,8 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Global
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
|