mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-23 12:32:14 +00:00
02589839cd
outputting to /.build (temp) and /.bin (final) instead of ../.bin removed the premake option "quake3dir" on Linux, not copying files if $QUAKE3DIR is undefined/empty on Linux, compiling all C++ code with -std=c++98 added a meta-Makefile at the root for convenience added build documentation (build.md)
223 lines
No EOL
6.7 KiB
Makefile
223 lines
No EOL
6.7 KiB
Makefile
# GNU Make project makefile autogenerated by Premake
|
|
|
|
ifndef config
|
|
config=debug_x32
|
|
endif
|
|
|
|
ifndef verbose
|
|
SILENT = @
|
|
endif
|
|
|
|
.PHONY: clean prebuild prelink
|
|
|
|
ifeq ($(config),debug_x32)
|
|
RESCOMP = windres
|
|
TARGETDIR = ../../.build/debug_x32
|
|
TARGET = $(TARGETDIR)/libfreetype.a
|
|
OBJDIR = ../../.build/debug_x32/freetype
|
|
DEFINES += -D_LIB -DFT2_BUILD_LIBRARY -D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -DDEBUG -D_DEBUG
|
|
INCLUDES += -I../../code/freetype/include
|
|
FORCE_INCLUDE +=
|
|
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g -Wno-unused-parameter -Wno-write-strings
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) -fno-exceptions -fno-rtti
|
|
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
|
LIBS +=
|
|
LDDEPS +=
|
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../../.build/debug_x32 -m32
|
|
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
|
|
define PREBUILDCMDS
|
|
endef
|
|
define PRELINKCMDS
|
|
endef
|
|
define POSTBUILDCMDS
|
|
endef
|
|
all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
|
|
@:
|
|
|
|
endif
|
|
|
|
ifeq ($(config),debug_x64)
|
|
RESCOMP = windres
|
|
TARGETDIR = ../../.build/debug_x64
|
|
TARGET = $(TARGETDIR)/libfreetype.a
|
|
OBJDIR = ../../.build/debug_x64/freetype
|
|
DEFINES += -D_LIB -DFT2_BUILD_LIBRARY -D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -DDEBUG -D_DEBUG
|
|
INCLUDES += -I../../code/freetype/include
|
|
FORCE_INCLUDE +=
|
|
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g -Wno-unused-parameter -Wno-write-strings
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) -fno-exceptions -fno-rtti
|
|
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
|
LIBS +=
|
|
LDDEPS +=
|
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../../.build/debug_x64 -m64
|
|
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
|
|
define PREBUILDCMDS
|
|
endef
|
|
define PRELINKCMDS
|
|
endef
|
|
define POSTBUILDCMDS
|
|
endef
|
|
all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
|
|
@:
|
|
|
|
endif
|
|
|
|
ifeq ($(config),release_x32)
|
|
RESCOMP = windres
|
|
TARGETDIR = ../../.build/release_x32
|
|
TARGET = $(TARGETDIR)/libfreetype.a
|
|
OBJDIR = ../../.build/release_x32/freetype
|
|
DEFINES += -D_LIB -DFT2_BUILD_LIBRARY -D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -DNDEBUG
|
|
INCLUDES += -I../../code/freetype/include
|
|
FORCE_INCLUDE +=
|
|
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -fomit-frame-pointer -ffast-math -Os -g -msse2 -Wno-unused-parameter -Wno-write-strings -g1
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) -fno-exceptions -fno-rtti
|
|
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
|
LIBS +=
|
|
LDDEPS +=
|
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L../../.build/release_x32 -m32
|
|
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
|
|
define PREBUILDCMDS
|
|
endef
|
|
define PRELINKCMDS
|
|
endef
|
|
define POSTBUILDCMDS
|
|
endef
|
|
all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
|
|
@:
|
|
|
|
endif
|
|
|
|
ifeq ($(config),release_x64)
|
|
RESCOMP = windres
|
|
TARGETDIR = ../../.build/release_x64
|
|
TARGET = $(TARGETDIR)/libfreetype.a
|
|
OBJDIR = ../../.build/release_x64/freetype
|
|
DEFINES += -D_LIB -DFT2_BUILD_LIBRARY -D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -DNDEBUG
|
|
INCLUDES += -I../../code/freetype/include
|
|
FORCE_INCLUDE +=
|
|
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -fomit-frame-pointer -ffast-math -Os -g -msse2 -Wno-unused-parameter -Wno-write-strings -g1
|
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) -fno-exceptions -fno-rtti
|
|
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
|
LIBS +=
|
|
LDDEPS +=
|
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L../../.build/release_x64 -m64
|
|
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
|
|
define PREBUILDCMDS
|
|
endef
|
|
define PRELINKCMDS
|
|
endef
|
|
define POSTBUILDCMDS
|
|
endef
|
|
all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
|
|
@:
|
|
|
|
endif
|
|
|
|
OBJECTS := \
|
|
$(OBJDIR)/ftbase.o \
|
|
$(OBJDIR)/ftbbox.o \
|
|
$(OBJDIR)/ftglyph.o \
|
|
$(OBJDIR)/ftinit.o \
|
|
$(OBJDIR)/ftstroke.o \
|
|
$(OBJDIR)/ftsynth.o \
|
|
$(OBJDIR)/ftsystem.o \
|
|
$(OBJDIR)/sfnt.o \
|
|
$(OBJDIR)/smooth.o \
|
|
$(OBJDIR)/truetype.o \
|
|
|
|
RESOURCES := \
|
|
|
|
CUSTOMFILES := \
|
|
|
|
SHELLTYPE := msdos
|
|
ifeq (,$(ComSpec)$(COMSPEC))
|
|
SHELLTYPE := posix
|
|
endif
|
|
ifeq (/bin,$(findstring /bin,$(SHELL)))
|
|
SHELLTYPE := posix
|
|
endif
|
|
|
|
$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
|
|
@echo Linking freetype
|
|
$(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 freetype
|
|
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))
|
|
$(OBJECTS): $(GCH) $(PCH)
|
|
$(GCH): $(PCH)
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
|
|
endif
|
|
|
|
$(OBJDIR)/ftbase.o: ../../code/freetype/src/base/ftbase.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
$(OBJDIR)/ftbbox.o: ../../code/freetype/src/base/ftbbox.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
$(OBJDIR)/ftglyph.o: ../../code/freetype/src/base/ftglyph.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
$(OBJDIR)/ftinit.o: ../../code/freetype/src/base/ftinit.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
$(OBJDIR)/ftstroke.o: ../../code/freetype/src/base/ftstroke.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
$(OBJDIR)/ftsynth.o: ../../code/freetype/src/base/ftsynth.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
$(OBJDIR)/ftsystem.o: ../../code/freetype/src/base/ftsystem.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
$(OBJDIR)/sfnt.o: ../../code/freetype/src/sfnt/sfnt.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
$(OBJDIR)/smooth.o: ../../code/freetype/src/smooth/smooth.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
$(OBJDIR)/truetype.o: ../../code/freetype/src/truetype/truetype.c
|
|
@echo $(notdir $<)
|
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
|
|
|
-include $(OBJECTS:%.o=%.d)
|
|
ifneq (,$(PCH))
|
|
-include $(OBJDIR)/$(notdir $(PCH)).d
|
|
endif |