mirror of https://github.com/gabime/spdlog.git
Build system in place, compilation 1
parent
b75edfafca
commit
dfb40772b2
@ -0,0 +1,10 @@
|
|||||||
|
workspace "spdlog"
|
||||||
|
configurations {"release"}
|
||||||
|
|
||||||
|
project "spdlog"
|
||||||
|
kind "StaticLib"
|
||||||
|
language "C++"
|
||||||
|
|
||||||
|
objdir "build"
|
||||||
|
targetdir "lib"
|
||||||
|
targetname "spdlog"
|
@ -0,0 +1,116 @@
|
|||||||
|
# Alternative GNU Make project makefile autogenerated by Premake
|
||||||
|
|
||||||
|
ifndef config
|
||||||
|
config=release
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef verbose
|
||||||
|
SILENT = @
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: clean prebuild
|
||||||
|
|
||||||
|
SHELLTYPE := posix
|
||||||
|
ifeq (.exe,$(findstring .exe,$(ComSpec)))
|
||||||
|
SHELLTYPE := msdos
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Configurations
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
RESCOMP = windres
|
||||||
|
TARGETDIR = lib
|
||||||
|
TARGET = $(TARGETDIR)/spdlog.lib
|
||||||
|
OBJDIR = build
|
||||||
|
DEFINES +=
|
||||||
|
INCLUDES +=
|
||||||
|
FORCE_INCLUDE +=
|
||||||
|
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS)
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS)
|
||||||
|
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||||
|
LIBS +=
|
||||||
|
LDDEPS +=
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -s
|
||||||
|
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
|
||||||
|
define PREBUILDCMDS
|
||||||
|
endef
|
||||||
|
define PRELINKCMDS
|
||||||
|
endef
|
||||||
|
define POSTBUILDCMDS
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Per File Configurations
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
|
||||||
|
# File sets
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
|
||||||
|
# Rules
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
all: $(TARGET)
|
||||||
|
@:
|
||||||
|
|
||||||
|
$(TARGET): $(OBJECTS) $(LDDEPS) | $(TARGETDIR)
|
||||||
|
$(PRELINKCMDS)
|
||||||
|
@echo Linking spdlog
|
||||||
|
$(SILENT) $(LINKCMD)
|
||||||
|
$(POSTBUILDCMDS)
|
||||||
|
|
||||||
|
$(TARGETDIR):
|
||||||
|
@echo Creating $(TARGETDIR)
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) mkdir -p $(TARGETDIR)
|
||||||
|
else
|
||||||
|
$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
@echo Creating $(OBJDIR)
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) mkdir -p $(OBJDIR)
|
||||||
|
else
|
||||||
|
$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning spdlog
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) rm -f $(TARGET)
|
||||||
|
$(SILENT) rm -rf $(GENERATED)
|
||||||
|
$(SILENT) rm -rf $(OBJDIR)
|
||||||
|
else
|
||||||
|
$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
|
||||||
|
$(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED))
|
||||||
|
$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
|
prebuild: | $(OBJDIR)
|
||||||
|
$(PREBUILDCMDS)
|
||||||
|
|
||||||
|
ifneq (,$(PCH))
|
||||||
|
$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER)
|
||||||
|
$(GCH): $(PCH) | prebuild
|
||||||
|
@echo $(notdir $<)
|
||||||
|
$(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
|
||||||
|
$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR)
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) touch "$@"
|
||||||
|
else
|
||||||
|
$(SILENT) echo $null >> "$@"
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
$(OBJECTS): | prebuild
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# File Rules
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
-include $(OBJECTS:%.o=%.d)
|
||||||
|
ifneq (,$(PCH))
|
||||||
|
-include $(PCH_PLACEHOLDER).d
|
||||||
|
endif
|
Loading…
Reference in New Issue