* Improve Makefile startup time

+ Merge q3asm and q3lcc Makefiles into the core Makefile
  + Don't find .d files, create a list from .o
  + .asm files now depend on q3lcc
  + .qvm files now depend on q3asm
* IMPORTANT NOTE: do a "make distclean" if you have problems
This commit is contained in:
Tim Angus 2007-09-12 23:37:33 +00:00
parent 1d54a9ebe5
commit c7c2ee1b84
6 changed files with 185 additions and 485 deletions

244
Makefile
View file

@ -80,11 +80,6 @@ ifndef GENERATE_DEPENDENCIES
GENERATE_DEPENDENCIES=1
endif
ifndef USE_CCACHE
USE_CCACHE=0
endif
export USE_CCACHE
ifndef USE_OPENAL
USE_OPENAL=1
endif
@ -131,10 +126,15 @@ NDIR=$(MOUNT_DIR)/null
UIDIR=$(MOUNT_DIR)/ui
Q3UIDIR=$(MOUNT_DIR)/q3_ui
JPDIR=$(MOUNT_DIR)/jpeg-6
TOOLSDIR=$(MOUNT_DIR)/tools
Q3ASMDIR=$(MOUNT_DIR)/tools/asm
LBURGDIR=$(MOUNT_DIR)/tools/lcc/lburg
Q3CPPDIR=$(MOUNT_DIR)/tools/lcc/cpp
Q3LCCETCDIR=$(MOUNT_DIR)/tools/lcc/etc
Q3LCCSRCDIR=$(MOUNT_DIR)/tools/lcc/src
LOKISETUPDIR=misc/setup
SDLHDIR=$(MOUNT_DIR)/SDL12
LIBSDIR=$(MOUNT_DIR)/libs
TEMPDIR=/tmp
# extract version info
VERSION=$(shell grep "\#define *PRODUCT_VERSION" $(CMDIR)/q_shared.h | \
@ -384,6 +384,8 @@ ifeq ($(PLATFORM),darwin)
NOTSHLIBCFLAGS=-mdynamic-no-pic
TOOLS_CFLAGS += -DMACOS_X
else # ifeq darwin
@ -702,10 +704,6 @@ ifneq ($(BUILD_GAME_QVM),0)
endif
endif
ifeq ($(USE_CCACHE),1)
CC := ccache $(CC)
endif
ifdef DEFAULT_BASEDIR
BASE_CFLAGS += -DDEFAULT_BASEDIR=\\\"$(DEFAULT_BASEDIR)\\\"
endif
@ -790,9 +788,9 @@ debug:
release:
@$(MAKE) targets B=$(BR) CFLAGS="$(CFLAGS) $(RELEASE_CFLAGS)" V=$(V)
# Create the build directories and tools, print out
# Create the build directories, check libraries and print out
# an informational message, then start building
targets: makedirs tools libversioncheck
targets: makedirs libversioncheck
@echo ""
@echo "Building ioquake3 in $(B):"
@echo " PLATFORM: $(PLATFORM)"
@ -833,22 +831,125 @@ makedirs:
@if [ ! -d $(B)/missionpack/ui ];then $(MKDIR) $(B)/missionpack/ui;fi
@if [ ! -d $(B)/missionpack/qcommon ];then $(MKDIR) $(B)/missionpack/qcommon;fi
@if [ ! -d $(B)/missionpack/vm ];then $(MKDIR) $(B)/missionpack/vm;fi
@if [ ! -d $(B)/tools ];then $(MKDIR) $(B)/tools;fi
@if [ ! -d $(B)/tools/asm ];then $(MKDIR) $(B)/tools/asm;fi
@if [ ! -d $(B)/tools/etc ];then $(MKDIR) $(B)/tools/etc;fi
@if [ ! -d $(B)/tools/rcc ];then $(MKDIR) $(B)/tools/rcc;fi
@if [ ! -d $(B)/tools/cpp ];then $(MKDIR) $(B)/tools/cpp;fi
@if [ ! -d $(B)/tools/lburg ];then $(MKDIR) $(B)/tools/lburg;fi
#############################################################################
# QVM BUILD TOOLS
#############################################################################
Q3LCC=$(TOOLSDIR)/q3lcc$(BINEXT)
Q3ASM=$(TOOLSDIR)/q3asm$(BINEXT)
TOOLS_CFLAGS = -O2 -Wall -Werror -fno-strict-aliasing -MMD \
-DTEMPDIR=\"$(TEMPDIR)\" -DSYSTEM=\"\" \
-I$(Q3LCCSRCDIR) \
-I$(LBURGDIR)
TOOLS_LDFLAGS =
ifeq ($(CROSS_COMPILING),1)
tools:
@echo QVM tools not built when cross-compiling
else
tools:
$(MAKE) -C $(TOOLSDIR)/lcc install
$(MAKE) -C $(TOOLSDIR)/asm install
endif
define DO_TOOLS_CC
$(echo_cmd) "TOOLS_CC $<"
$(Q)$(CC) $(TOOLS_CFLAGS) -o $@ -c $<
endef
define DO_TOOLS_CC_DAGCHECK
$(echo_cmd) "TOOLS_CC_DAGCHECK $<"
$(Q)$(CC) $(TOOLS_CFLAGS) -Wno-unused -o $@ -c $<
endef
LBURG = $(B)/tools/lburg/lburg$(BINEXT)
DAGCHECK_C = $(B)/tools/rcc/dagcheck.c
Q3RCC = $(B)/tools/q3rcc$(BINEXT)
Q3CPP = $(B)/tools/q3cpp$(BINEXT)
Q3LCC = $(B)/tools/q3lcc$(BINEXT)
Q3ASM = $(B)/tools/q3asm$(BINEXT)
LBURGOBJ= \
$(B)/tools/lburg/lburg.o \
$(B)/tools/lburg/gram.o
$(B)/tools/lburg/%.o: $(LBURGDIR)/%.c
$(DO_TOOLS_CC)
$(LBURG): $(LBURGOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(TOOLS_LDFLAGS) -o $@ $^
Q3RCCOBJ = \
$(B)/tools/rcc/alloc.o \
$(B)/tools/rcc/bind.o \
$(B)/tools/rcc/bytecode.o \
$(B)/tools/rcc/dag.o \
$(B)/tools/rcc/dagcheck.o \
$(B)/tools/rcc/decl.o \
$(B)/tools/rcc/enode.o \
$(B)/tools/rcc/error.o \
$(B)/tools/rcc/event.o \
$(B)/tools/rcc/expr.o \
$(B)/tools/rcc/gen.o \
$(B)/tools/rcc/init.o \
$(B)/tools/rcc/inits.o \
$(B)/tools/rcc/input.o \
$(B)/tools/rcc/lex.o \
$(B)/tools/rcc/list.o \
$(B)/tools/rcc/main.o \
$(B)/tools/rcc/null.o \
$(B)/tools/rcc/output.o \
$(B)/tools/rcc/prof.o \
$(B)/tools/rcc/profio.o \
$(B)/tools/rcc/simp.o \
$(B)/tools/rcc/stmt.o \
$(B)/tools/rcc/string.o \
$(B)/tools/rcc/sym.o \
$(B)/tools/rcc/symbolic.o \
$(B)/tools/rcc/trace.o \
$(B)/tools/rcc/tree.o \
$(B)/tools/rcc/types.o
$(DAGCHECK_C): $(LBURG) $(Q3LCCSRCDIR)/dagcheck.md
$(echo_cmd) "LBURG $(Q3LCCSRCDIR)/dagcheck.md"
$(Q)$(LBURG) $(Q3LCCSRCDIR)/dagcheck.md $@
$(B)/tools/rcc/dagcheck.o: $(DAGCHECK_C)
$(DO_TOOLS_CC_DAGCHECK)
$(B)/tools/rcc/%.o: $(Q3LCCSRCDIR)/%.c
$(DO_TOOLS_CC)
$(Q3RCC): $(Q3RCCOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(TOOLS_LDFLAGS) -o $@ $^
Q3CPPOBJ = \
$(B)/tools/cpp/cpp.o \
$(B)/tools/cpp/lex.o \
$(B)/tools/cpp/nlist.o \
$(B)/tools/cpp/tokens.o \
$(B)/tools/cpp/macro.o \
$(B)/tools/cpp/eval.o \
$(B)/tools/cpp/include.o \
$(B)/tools/cpp/hideset.o \
$(B)/tools/cpp/getopt.o \
$(B)/tools/cpp/unix.o
$(B)/tools/cpp/%.o: $(Q3CPPDIR)/%.c
$(DO_TOOLS_CC)
$(Q3CPP): $(Q3CPPOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(TOOLS_LDFLAGS) -o $@ $^
Q3LCCOBJ = \
$(B)/tools/etc/lcc.o \
$(B)/tools/etc/bytecode.o
$(B)/tools/etc/%.o: $(Q3LCCETCDIR)/%.c
$(DO_TOOLS_CC)
$(Q3LCC): $(Q3LCCOBJ) $(Q3RCC) $(Q3CPP)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(TOOLS_LDFLAGS) -o $@ $(Q3LCCOBJ)
define DO_Q3LCC
$(echo_cmd) "Q3LCC $<"
@ -861,6 +962,18 @@ $(Q)$(Q3LCC) -DMISSIONPACK -o $@ $<
endef
Q3ASMOBJ = \
$(B)/tools/asm/q3asm.o \
$(B)/tools/asm/cmdlib.o
$(B)/tools/asm/%.o: $(Q3ASMDIR)/%.c
$(DO_TOOLS_CC)
$(Q3ASM): $(Q3ASMOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(TOOLS_LDFLAGS) -o $@ $^
#############################################################################
# LIBRARY VERSION CHECKS
#############################################################################
@ -1261,11 +1374,11 @@ Q3CGOBJ_ = \
Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o
Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ)
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT): $(Q3CGOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
$(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
$(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm $(Q3ASM)
$(echo_cmd) "Q3ASM $@"
$(Q)$(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
@ -1304,11 +1417,11 @@ MPCGOBJ_ = \
MPCGOBJ = $(MPCGOBJ_) $(B)/missionpack/cgame/cg_syscalls.o
MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ)
$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT): $(MPCGOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
$(B)/missionpack/vm/cgame.qvm: $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
$(B)/missionpack/vm/cgame.qvm: $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm $(Q3ASM)
$(echo_cmd) "Q3ASM $@"
$(Q)$(Q3ASM) -o $@ $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
@ -1356,11 +1469,11 @@ Q3GOBJ_ = \
Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o
Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT): $(Q3GOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
$(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
$(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM)
$(echo_cmd) "Q3ASM $@"
$(Q)$(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
@ -1406,11 +1519,11 @@ MPGOBJ_ = \
MPGOBJ = $(MPGOBJ_) $(B)/missionpack/game/g_syscalls.o
MPGVMOBJ = $(MPGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ)
$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT): $(MPGOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
$(B)/missionpack/vm/qagame.qvm: $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
$(B)/missionpack/vm/qagame.qvm: $(MPGVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM)
$(echo_cmd) "Q3ASM $@"
$(Q)$(Q3ASM) -o $@ $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
@ -1468,11 +1581,11 @@ Q3UIOBJ_ = \
Q3UIOBJ = $(Q3UIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ)
$(B)/baseq3/ui$(ARCH).$(SHLIBEXT): $(Q3UIOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
$(B)/baseq3/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
$(B)/baseq3/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM)
$(echo_cmd) "Q3ASM $@"
$(Q)$(Q3ASM) -o $@ $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
@ -1495,11 +1608,11 @@ MPUIOBJ_ = \
MPUIOBJ = $(MPUIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ)
$(B)/missionpack/ui$(ARCH).$(SHLIBEXT): $(MPUIOBJ)
$(echo_cmd) "LD $@"
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
$(B)/missionpack/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
$(B)/missionpack/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM)
$(echo_cmd) "Q3ASM $@"
$(Q)$(Q3ASM) -o $@ $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
@ -1579,52 +1692,52 @@ endif
$(B)/baseq3/cgame/%.o: $(CGDIR)/%.c
$(DO_SHLIB_CC)
$(B)/baseq3/cgame/%.asm: $(CGDIR)/%.c
$(B)/baseq3/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC)
$(DO_Q3LCC)
$(B)/missionpack/cgame/%.o: $(CGDIR)/%.c
$(DO_SHLIB_CC_MISSIONPACK)
$(B)/missionpack/cgame/%.asm: $(CGDIR)/%.c
$(B)/missionpack/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC)
$(DO_Q3LCC_MISSIONPACK)
$(B)/baseq3/game/%.o: $(GDIR)/%.c
$(DO_SHLIB_CC)
$(B)/baseq3/game/%.asm: $(GDIR)/%.c
$(B)/baseq3/game/%.asm: $(GDIR)/%.c $(Q3LCC)
$(DO_Q3LCC)
$(B)/missionpack/game/%.o: $(GDIR)/%.c
$(DO_SHLIB_CC_MISSIONPACK)
$(B)/missionpack/game/%.asm: $(GDIR)/%.c
$(B)/missionpack/game/%.asm: $(GDIR)/%.c $(Q3LCC)
$(DO_Q3LCC_MISSIONPACK)
$(B)/baseq3/ui/%.o: $(Q3UIDIR)/%.c
$(DO_SHLIB_CC)
$(B)/baseq3/ui/%.asm: $(Q3UIDIR)/%.c
$(B)/baseq3/ui/%.asm: $(Q3UIDIR)/%.c $(Q3LCC)
$(DO_Q3LCC)
$(B)/missionpack/ui/%.o: $(UIDIR)/%.c
$(DO_SHLIB_CC_MISSIONPACK)
$(B)/missionpack/ui/%.asm: $(UIDIR)/%.c
$(B)/missionpack/ui/%.asm: $(UIDIR)/%.c $(Q3LCC)
$(DO_Q3LCC_MISSIONPACK)
$(B)/baseq3/qcommon/%.o: $(CMDIR)/%.c
$(DO_SHLIB_CC)
$(B)/baseq3/qcommon/%.asm: $(CMDIR)/%.c
$(B)/baseq3/qcommon/%.asm: $(CMDIR)/%.c $(Q3LCC)
$(DO_Q3LCC)
$(B)/missionpack/qcommon/%.o: $(CMDIR)/%.c
$(DO_SHLIB_CC_MISSIONPACK)
$(B)/missionpack/qcommon/%.asm: $(CMDIR)/%.c
$(B)/missionpack/qcommon/%.asm: $(CMDIR)/%.c $(Q3LCC)
$(DO_Q3LCC_MISSIONPACK)
@ -1632,6 +1745,12 @@ $(B)/missionpack/qcommon/%.asm: $(CMDIR)/%.c
# MISC
#############################################################################
OBJ = $(Q3OBJ) $(Q3POBJ) $(Q3POBJ_SMP) $(Q3DOBJ) \
$(MPGOBJ) $(Q3GOBJ) $(Q3CGOBJ) $(MPCGOBJ) $(Q3UIOBJ) $(MPUIOBJ) \
$(MPGVMOBJ) $(Q3GVMOBJ) $(Q3CGVMOBJ) $(MPCGVMOBJ) $(Q3UIVMOBJ) $(MPUIVMOBJ)
TOOLSOBJ = $(LBURGOBJ) $(Q3CPPOBJ) $(Q3RCCOBJ) $(Q3LCCOBJ) $(Q3ASMOBJ)
copyfiles: release
@if [ ! -d $(COPYDIR)/baseq3 ]; then echo "You need to set COPYDIR to where your Quake3 data is!"; fi
-$(MKDIR) -p -m 0755 $(COPYDIR)/baseq3
@ -1671,23 +1790,31 @@ endif
clean: clean-debug clean-release
@$(MAKE) -C $(LOKISETUPDIR) clean
clean2:
@echo "CLEAN $(B)"
@if [ -d $(B) ];then (find $(B) -name '*.d' -exec rm {} \;)fi
@rm -f $(Q3OBJ) $(Q3POBJ) $(Q3POBJ_SMP) $(Q3DOBJ) \
$(MPGOBJ) $(Q3GOBJ) $(Q3CGOBJ) $(MPCGOBJ) $(Q3UIOBJ) $(MPUIOBJ) \
$(MPGVMOBJ) $(Q3GVMOBJ) $(Q3CGVMOBJ) $(MPCGVMOBJ) $(Q3UIVMOBJ) $(MPUIVMOBJ)
@rm -f $(TARGETS)
clean-debug:
@$(MAKE) clean2 B=$(BD)
clean-release:
@$(MAKE) clean2 B=$(BR)
toolsclean:
@$(MAKE) -C $(TOOLSDIR)/asm clean uninstall
@$(MAKE) -C $(TOOLSDIR)/lcc clean uninstall
clean2:
@echo "CLEAN $(B)"
@rm -f $(OBJ)
@rm -f $(OBJ_D_FILES)
@rm -f $(TARGETS)
toolsclean: toolsclean-debug toolsclean-release
toolsclean-debug:
@$(MAKE) toolsclean2 B=$(BD)
toolsclean-release:
@$(MAKE) toolsclean2 B=$(BR)
toolsclean2:
@echo "TOOLS_CLEAN $(B)"
@rm -f $(TOOLSOBJ)
@rm -f $(TOOLSOBJ_D_FILES)
@rm -f $(LBURG) $(DAGCHECK_C) $(Q3RCC) $(Q3CPP) $(Q3LCC) $(Q3ASM)
distclean: clean toolsclean
@rm -rf $(BUILD_DIR)
@ -1705,12 +1832,11 @@ dist:
# DEPENDENCIES
#############################################################################
D_FILES=$(shell find . -name '*.d')
ifneq ($(strip $(D_FILES)),)
include $(D_FILES)
endif
OBJ_D_FILES=$(filter %.d,$(OBJ:%.o=%.d))
TOOLSOBJ_D_FILES=$(filter %.d,$(TOOLSOBJ:%.o=%.d))
-include $(OBJ_D_FILES) $(TOOLSOBJ_D_FILES)
.PHONY: all clean clean2 clean-debug clean-release copyfiles \
debug default dist distclean installer libversioncheck makedirs \
release targets tools toolsclean
release targets \
toolsclean toolsclean2 toolsclean-debug toolsclean-release

1
README
View file

@ -90,7 +90,6 @@ Makefile.local:
USE_CURL_DLOPEN - link with libcurl at runtime
USE_CODEC_VORBIS - enable Ogg Vorbis support
USE_LOCAL_HEADERS - use headers local to ioq3 instead of system ones
USE_CCACHE - use ccache compiler caching tool
COPYDIR - the target installation directory
The defaults for these variables differ depending on the target platform.

View file

@ -1,43 +0,0 @@
# yeah, couldn't do more simple really
ifeq ($(PLATFORM),mingw32)
BINEXT=.exe
else
BINEXT=
endif
ifeq ($(PLATFORM),sunos)
INSTALL=ginstall
else
INSTALL=install
endif
CC=gcc
Q3ASM_CFLAGS=-O2 -Wall -Werror -fno-strict-aliasing
ifeq ($(PLATFORM),darwin)
LCC_CFLAGS += -DMACOS_X=1
endif
ifndef USE_CCACHE
USE_CCACHE=0
endif
ifeq ($(USE_CCACHE),1)
CC := ccache $(CC)
CXX := ccache $(CXX)
endif
default: q3asm
q3asm: q3asm.c cmdlib.c
$(CC) $(Q3ASM_CFLAGS) -o $@ $^
clean:
rm -f q3asm *~ *.o
install: default
$(INSTALL) -s -m 0755 q3asm$(BINEXT) ../
uninstall:
rm -f ../q3asm$(BINEXT)

View file

@ -1,28 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "q3asm", "q3asm.vcproj", "{E0D6B319-6F95-4ABA-9BE0-5454CAA5C8CD}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SourceCodeControl) = preSolution
SccNumberOfProjects = 1
SccProjectUniqueName0 = q3asm.vcproj
SccProjectName0 = \u0022$/source/q3asm\u0022,\u0020YUCAAAAA
SccLocalPath0 = .
SccProvider0 = MSSCCI:Perforce\u0020SCM
EndGlobalSection
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{E0D6B319-6F95-4ABA-9BE0-5454CAA5C8CD}.Debug.ActiveCfg = Debug|Win32
{E0D6B319-6F95-4ABA-9BE0-5454CAA5C8CD}.Debug.Build.0 = Debug|Win32
{E0D6B319-6F95-4ABA-9BE0-5454CAA5C8CD}.Release.ActiveCfg = Release|Win32
{E0D6B319-6F95-4ABA-9BE0-5454CAA5C8CD}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View file

@ -1,191 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="q3asm"
SccProjectName="&quot;$/source/q3asm&quot;, YUCAAAAA"
SccLocalPath=".">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\"
IntermediateDirectory=".\build\release"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../common"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="TRUE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile="$(IntDir)\q3asm.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\q3asm.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ProgramDatabaseFile="$(IntDir)\q3asm.pdb"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Release/q3asm.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\"
IntermediateDirectory=".\build\debug"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../common"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
UsePrecompiledHeader="2"
PrecompiledHeaderFile="$(IntDir)\q3asm.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\q3asm.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(IntDir)\q3asm.pdb"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Debug/q3asm.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="cmdlib.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
</File>
<File
RelativePath="q3asm.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\common\cmdlib.h">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -1,163 +0,0 @@
TEMPDIR=/tmp
A=.a
O=.o
ifeq ($(PLATFORM),mingw32)
E=.exe
else
E=
endif
CC=gcc
LCC_CFLAGS=-O2 -Wall -fno-strict-aliasing -MMD
LDFLAGS=
LD=gcc
AR=ar
ARFLAGS=cru
RANLIB=ranlib
DIFF=diff
RM=rm -f
RMDIR=rmdir
BUILDDIR=build-$(PLATFORM)-$(ARCH)
BD=$(BUILDDIR)/
ifeq ($(USE_CCACHE),1)
CC := ccache $(CC)
endif
# Need MACOS_X defined or this won't build.
ifeq ($(PLATFORM),darwin)
LCC_CFLAGS += -DMACOS_X
endif
ifeq ($(PLATFORM),sunos)
INSTALL=ginstall
else
INSTALL=install
endif
all: q3rcc lburg q3cpp q3lcc
q3rcc: makedirs $(BD)q3rcc$(E)
lburg: makedirs $(BD)lburg$(E)
q3cpp: makedirs $(BD)q3cpp$(E)
q3lcc: makedirs $(BD)q3lcc$(E)
makedirs:
@if [ ! -d $(BD) ];then mkdir $(BD);fi
@if [ ! -d $(BD)/etc ];then mkdir $(BD)/etc;fi
@if [ ! -d $(BD)/rcc ];then mkdir $(BD)/rcc;fi
@if [ ! -d $(BD)/cpp ];then mkdir $(BD)/cpp;fi
@if [ ! -d $(BD)/lburg ];then mkdir $(BD)/lburg;fi
# ===== RCC =====
RCCOBJS= \
$(BD)rcc/alloc$(O) \
$(BD)rcc/bind$(O) \
$(BD)rcc/bytecode$(O) \
$(BD)rcc/dag$(O) \
$(BD)rcc/dagcheck$(O) \
$(BD)rcc/decl$(O) \
$(BD)rcc/enode$(O) \
$(BD)rcc/error$(O) \
$(BD)rcc/event$(O) \
$(BD)rcc/expr$(O) \
$(BD)rcc/gen$(O) \
$(BD)rcc/init$(O) \
$(BD)rcc/inits$(O) \
$(BD)rcc/input$(O) \
$(BD)rcc/lex$(O) \
$(BD)rcc/list$(O) \
$(BD)rcc/main$(O) \
$(BD)rcc/null$(O) \
$(BD)rcc/output$(O) \
$(BD)rcc/prof$(O) \
$(BD)rcc/profio$(O) \
$(BD)rcc/simp$(O) \
$(BD)rcc/stmt$(O) \
$(BD)rcc/string$(O) \
$(BD)rcc/sym$(O) \
$(BD)rcc/symbolic$(O) \
$(BD)rcc/trace$(O) \
$(BD)rcc/tree$(O) \
$(BD)rcc/types$(O)
$(BD)q3rcc$(E): $(RCCOBJS)
$(LD) $(LDFLAGS) -o $@ $(RCCOBJS)
$(BD)rcc/%$(O): src/%.c
$(CC) $(LCC_CFLAGS) -c -Isrc -o $@ $<
$(BD)rcc/dagcheck$(O): $(BD)rcc/dagcheck.c
$(CC) $(LCC_CFLAGS) -Wno-unused -c -Isrc -o $@ $<
$(BD)rcc/dagcheck.c: $(BD)lburg/lburg$(E) src/dagcheck.md
$(BD)lburg/lburg$(E) src/dagcheck.md $@
# ===== LBURG =====
LBURGOBJS= \
$(BD)lburg/lburg$(O) \
$(BD)lburg/gram$(O)
$(BD)lburg/lburg$(E): $(LBURGOBJS)
$(LD) $(LDFLAGS) -o $@ $(LBURGOBJS)
$(BD)lburg/%$(O): lburg/%.c
$(CC) $(LCC_CFLAGS) -c -Ilburg -o $@ $<
# ===== CPP =====
CPPOBJS= \
$(BD)cpp/cpp$(O) \
$(BD)cpp/lex$(O) \
$(BD)cpp/nlist$(O) \
$(BD)cpp/tokens$(O) \
$(BD)cpp/macro$(O) \
$(BD)cpp/eval$(O) \
$(BD)cpp/include$(O) \
$(BD)cpp/hideset$(O) \
$(BD)cpp/getopt$(O) \
$(BD)cpp/unix$(O)
$(BD)q3cpp$(E): $(CPPOBJS)
$(LD) $(LDFLAGS) -o $@ $(CPPOBJS)
$(BD)cpp/%$(O): cpp/%.c
$(CC) $(LCC_CFLAGS) -c -Icpp -o $@ $<
# ===== LCC =====
LCCOBJS= \
$(BD)etc/lcc$(O) \
$(BD)etc/bytecode$(O)
$(BD)q3lcc$(E): $(LCCOBJS)
$(LD) $(LDFLAGS) -o $@ $(LCCOBJS)
$(BD)etc/%$(O): etc/%.c
$(CC) $(LCC_CFLAGS) -DTEMPDIR=\"$(TEMPDIR)\" -DSYSTEM=\"\" -c -Isrc -o $@ $<
install: q3lcc q3cpp q3rcc
$(INSTALL) -s -m 0755 $(BD)q3lcc$(E) ../
$(INSTALL) -s -m 0755 $(BD)q3cpp$(E) ../
$(INSTALL) -s -m 0755 $(BD)q3rcc$(E) ../
uninstall:
-$(RM) ../q3lcc$(E)
-$(RM) ../q3cpp$(E)
-$(RM) ../q3rcc$(E)
clean:
if [ -d $(BD) ];then (find $(BD) -name '*.d' -exec rm {} \;)fi
$(RM) $(RCCOBJS) $(LBURGOBJS) $(CPPOBJS) $(LCCOBJS)
$(RM) $(BD)rcc/dagcheck.c $(BD)lburg/lburg$(E)
$(RM) $(BD)q3lcc$(E) $(BD)q3cpp$(E) $(BD)q3rcc$(E)
$(RM) -r $(BD)
D_FILES=$(shell find . -name '*.d')
ifneq ($(strip $(D_FILES)),)
include $(D_FILES)
endif