Fix MakeGen not creating binary directories
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
# This Makefile was generated using MakeGen v1.1.0 made by Tim Håkansson
|
# This Makefile was generated using MakeGen v1.1.1 made by Tim Håkansson
|
||||||
# and is licensed under MIT. Full source of the project can be found at
|
# and is licensed under MIT. Full source of the project can be found at
|
||||||
# https://github.com/Thraix/MakeGen
|
# https://github.com/Thraix/MakeGen
|
||||||
CC=@g++
|
CC=@g++
|
||||||
CO=@g++ -o
|
CO=@g++ -o
|
||||||
|
MKDIR_P=mkdir -p
|
||||||
BIN=bin/
|
BIN=bin/
|
||||||
OBJPATH=$(BIN)intermediates
|
OBJPATH=$(BIN)intermediates
|
||||||
INCLUDES=
|
INCLUDES=
|
||||||
@@ -12,7 +13,14 @@ LIBDIR=
|
|||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
LIBS=$(LIBDIR)
|
LIBS=$(LIBDIR)
|
||||||
OUTPUT=$(BIN)makegen
|
OUTPUT=$(BIN)makegen
|
||||||
all: $(OUTPUT)
|
.PHONY: directories all rebuild clean
|
||||||
|
all: directories $(OUTPUT)
|
||||||
|
directories: $(BIN) $(OBJPATH)
|
||||||
|
$(BIN):
|
||||||
|
$(info Creating output directories)
|
||||||
|
@$(MKDIR_P) $(BIN)
|
||||||
|
$(OBJPATH):
|
||||||
|
@$(MKDIR_P) $(OBJPATH)
|
||||||
rebuild: clean all
|
rebuild: clean all
|
||||||
clean:
|
clean:
|
||||||
$(info Removing intermediates)
|
$(info Removing intermediates)
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
// Release , should be backwards compatible with any minor version
|
// Release , should be backwards compatible with any minor version
|
||||||
#define MAKEGEN_VERSION_RELEASE 1
|
#define MAKEGEN_VERSION_RELEASE 1
|
||||||
// Minor changes, should be compatible with any other minor version with same major and release.
|
// Minor changes, should be compatible with any other minor version with same major and release.
|
||||||
#define MAKEGEN_VERSION_MINOR 0
|
#define MAKEGEN_VERSION_MINOR 1
|
||||||
#define MAKEGEN_VERSION ("v" STR(MAKEGEN_VERSION_MAJOR) "." STR(MAKEGEN_VERSION_RELEASE) "." STR(MAKEGEN_VERSION_MINOR))
|
#define MAKEGEN_VERSION ("v" STR(MAKEGEN_VERSION_MAJOR) "." STR(MAKEGEN_VERSION_RELEASE) "." STR(MAKEGEN_VERSION_MINOR))
|
||||||
|
|
||||||
const static unsigned int FLAG_HELP = BIT(0);
|
const static unsigned int FLAG_HELP = BIT(0);
|
||||||
|
|||||||
+9
-1
@@ -29,6 +29,7 @@ void Makefile::Save(const ConfigFile& conf)
|
|||||||
else
|
else
|
||||||
outputFile << "CO=@g++ -o" << std::endl;
|
outputFile << "CO=@g++ -o" << std::endl;
|
||||||
|
|
||||||
|
outputFile << "MKDIR_P=mkdir -p" << std::endl;
|
||||||
outputFile << "BIN=" << conf.outputdir << std::endl;
|
outputFile << "BIN=" << conf.outputdir << std::endl;
|
||||||
outputFile << "OBJPATH=$(BIN)intermediates" << std::endl;
|
outputFile << "OBJPATH=$(BIN)intermediates" << std::endl;
|
||||||
outputFile << "INCLUDES=";
|
outputFile << "INCLUDES=";
|
||||||
@@ -84,10 +85,17 @@ void Makefile::Save(const ConfigFile& conf)
|
|||||||
outputFile << std::endl;
|
outputFile << std::endl;
|
||||||
}
|
}
|
||||||
outputFile << "OUTPUT=$(BIN)" << conf.outputname << std::endl;
|
outputFile << "OUTPUT=$(BIN)" << conf.outputname << std::endl;
|
||||||
outputFile << "all: $(OUTPUT)" << std::endl;
|
outputFile << ".PHONY: all directories rebuild clean" << std::endl;
|
||||||
|
outputFile << "all: directories $(OUTPUT)" << std::endl;
|
||||||
//outputFile << "\t$(info ------------------------)" << std::endl;
|
//outputFile << "\t$(info ------------------------)" << std::endl;
|
||||||
//outputFile << "\t$(info ---- Done Compiling ----)" << std::endl;
|
//outputFile << "\t$(info ---- Done Compiling ----)" << std::endl;
|
||||||
//outputFile << "\t$(info ------------------------)" << std::endl;
|
//outputFile << "\t$(info ------------------------)" << std::endl;
|
||||||
|
outputFile << "directories: $(BIN) $(OBJPATH)" << std::endl;
|
||||||
|
outputFile << "$(BIN):" << std::endl;
|
||||||
|
outputFile << "\t$(info Creating output directories)" << std::endl;
|
||||||
|
outputFile << "\t@$(MKDIR_P) $(BIN)" << std::endl;
|
||||||
|
outputFile << "$(OBJPATH):" << std::endl;
|
||||||
|
outputFile << "\t@$(MKDIR_P) $(OBJPATH)" << std::endl;
|
||||||
outputFile << "rebuild: clean all" << std::endl;
|
outputFile << "rebuild: clean all" << std::endl;
|
||||||
outputFile << "clean:" << std::endl;
|
outputFile << "clean:" << std::endl;
|
||||||
outputFile << "\t$(info Removing intermediates)" << std::endl;
|
outputFile << "\t$(info Removing intermediates)" << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user