mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-01-31 20:50:36 +00:00
Added MGL target (relax Palisade - it's only compiled on win32 ;)
Moved d_copy.s from SWREND_SRC_PLAT to SVGA_VID_SRC as the functions in there are only used in vid_svgalib.c and vid_vga.c
This commit is contained in:
parent
26c0d830b2
commit
c5de0f10c5
2 changed files with 121 additions and 9 deletions
|
@ -28,6 +28,7 @@ ifneq ($(SRC_DIR),.)
|
|||
SRC_DIR_INC = -I$(SRC_DIR)
|
||||
endif
|
||||
|
||||
HAS_MGL = @HAS_MGL@
|
||||
HAS_GGI = @HAS_GGI@
|
||||
HAS_SVGA = @HAS_SVGA@
|
||||
HAS_GLIDE = @HAS_GLIDE@
|
||||
|
@ -71,6 +72,10 @@ ifeq ($(HAS_GGI),yes)
|
|||
GGIQUAKE = $(BIN_PREFIX)-ggi
|
||||
endif
|
||||
|
||||
ifeq ($(HAS_MGL),yes)
|
||||
MGLQUAKE = $(BIN_PREFIX)-mgl
|
||||
endif
|
||||
|
||||
ifeq ($(HAS_SDL),yes)
|
||||
SDLQUAKE = $(BIN_PREFIX)-sdl
|
||||
endif
|
||||
|
@ -82,7 +87,7 @@ else
|
|||
OPTFLAGS = -g
|
||||
endif
|
||||
|
||||
targets = $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE) $(SDLQUAKE)
|
||||
targets = $(MGLQUAKE) $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE) $(SDLQUAKE)
|
||||
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
|
||||
.PHONY: $(targets) ($CLEAN_TARGETS)
|
||||
|
||||
|
@ -107,7 +112,7 @@ ifeq ($(INTEL_ARCH),yes)
|
|||
UQ_GENERAL_SRC = worlda.s
|
||||
UQ_SWREND_SRC_PLAT = dosasm.s
|
||||
CL_ADDITIONAL_GENERAL_SRC = sys_dosa.s math.s
|
||||
SWREND_SRC_PLAT = d_copy.s d_draw.s d_draw16.s d_parta.s d_polysa.s d_scana.s \
|
||||
SWREND_SRC_PLAT = d_draw.s d_draw16.s d_parta.s d_polysa.s d_scana.s \
|
||||
d_spr8.s d_varsa.s r_aclipa.s r_aliasa.s \
|
||||
r_drawa.s r_edgea.s r_varsa.s surf16.s surf8.s
|
||||
else
|
||||
|
@ -153,10 +158,7 @@ QW_SRV_SYS_SRC = @QW_SRV_SYS_SRC@
|
|||
#
|
||||
# Networking source files
|
||||
#
|
||||
# XXX - Should not assume UNIX
|
||||
NET_SRC = net_bsd.c net_udp.c
|
||||
QW_NET_SRC = net_udp.c net_com.c mdfour.c
|
||||
UQ_NET_SRC = net_dgrm.c net_loop.c net_main.c net_vcr.c $(NET_SRC)
|
||||
|
||||
#
|
||||
# Common source files
|
||||
|
@ -275,6 +277,7 @@ clean-$(X11QUAKE):
|
|||
rm -f $(OBJSquake-x11)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# qw-client-svga
|
||||
|
@ -285,7 +288,7 @@ OBJSquake-svga= $(patsubst %,$(BUILD_DIR)/svga/%,$(addsuffix .@OBJEXT@, $(basena
|
|||
|
||||
SVGA_CFLAGS = @SVGA_CFLAGS@
|
||||
SVGA_LDFLAGS = @SVGA_LIBS@
|
||||
SVGA_VID_SRC = vid_svgalib.c
|
||||
SVGA_VID_SRC = vid_svgalib.c d_copy.s
|
||||
|
||||
# This can be thought of as a macro that makes sure that the x11
|
||||
# sub-directory is created
|
||||
|
@ -328,6 +331,7 @@ clean-$(SVGAQUAKE):
|
|||
rm -f $(OBJSquake-svga)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# qw-client-ggi
|
||||
|
@ -374,6 +378,57 @@ clean-$(GGIQUAKE):
|
|||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# qw-client-mgl
|
||||
#
|
||||
ifneq ($(MGLQUAKE),)
|
||||
|
||||
# Map the list of source files into a list of object files
|
||||
ALL_MGL_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(MGL_VID_SRC) model.c
|
||||
OBJSquake-mgl = $(patsubst %,$(BUILD_DIR)/mgl/%,$(addsuffix .@OBJEXT@, $(basename $(ALL_MGL_SRC) .c .s)))
|
||||
|
||||
MGL_CFLAGS = -DMGL @MGL_CFLAGS@
|
||||
MGL_LDFLAGS = @MGL_LIBS@ -lm
|
||||
MGL_VID_SRC = vid_win.c in_win.c
|
||||
|
||||
# This can be thought of as a macro that makes sure that the mgl
|
||||
# sub-directory is created
|
||||
# XXX - can we avoid doing every compile?
|
||||
MAKE_SURE_mgl_DIR = @DIR=mgl; $(MAKE_SURE_DIR)
|
||||
|
||||
$(BUILD_DIR)/mgl/%.o: $(SRC_DIR)/%.c
|
||||
$(MAKE_SURE_mgl_DIR)
|
||||
$(CC) $(CFLAGS) $(MGL_CFLAGS) -o $@ -c $<
|
||||
|
||||
$(BUILD_DIR)/mgl/%.o: $(SRC_DIR)/%.s
|
||||
$(MAKE_SURE_mgl_DIR)
|
||||
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
||||
|
||||
$(BUILD_DIR)/mgl/%.o: $(COMMON_DIR)/%.c
|
||||
$(MAKE_SURE_mgl_DIR)
|
||||
$(CC) $(CFLAGS) $(MGL_CFLAGS) -o $@ -c $<
|
||||
|
||||
ifneq ($(QW_COMMON_DIR),)
|
||||
$(BUILD_DIR)/mgl/%.o: $(QW_COMMON_DIR)/%.c
|
||||
$(MAKE_SURE_mgl_DIR)
|
||||
$(CC) $(CFLAGS) $(MGL_CFLAGS) -o $@ -c $<
|
||||
endif
|
||||
|
||||
$(BUILD_DIR)/mgl/%.o: $(COMMON_DIR)/%.s
|
||||
$(MAKE_SURE_mgl_DIR)
|
||||
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
||||
|
||||
$(MGLQUAKE): $(BUILD_DIR)/../$(MGLQUAKE)
|
||||
|
||||
$(BUILD_DIR)/../$(MGLQUAKE): $(OBJSquake-mgl)
|
||||
$(CC) $(CFLAGS) $(OBJSquake-mgl) $(MGL_LDFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/../$(MGLQUAKE)
|
||||
# XXX - Can this be automated?
|
||||
clean-$(MGLQUAKE):
|
||||
rm -f $(OBJSquake-mgl)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# qw-client-gl
|
||||
|
@ -418,6 +473,7 @@ clean-$(GLQUAKE):
|
|||
rm -f $(OBJSquake-gl)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# qw-client-3dfx
|
||||
|
@ -505,6 +561,7 @@ clean-$(SDLQUAKE):
|
|||
rm -f $(OBJSquake-sdl)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# cleaning (clean, distclean)
|
||||
|
|
|
@ -27,6 +27,7 @@ ifneq ($(SRC_DIR),.)
|
|||
SRC_DIR_INC = -I$(SRC_DIR)
|
||||
endif
|
||||
|
||||
HAS_MGL = @HAS_MGL@
|
||||
HAS_GGI = @HAS_GGI@
|
||||
HAS_SVGA = @HAS_SVGA@
|
||||
HAS_GLIDE = @HAS_GLIDE@
|
||||
|
@ -66,6 +67,10 @@ ifeq ($(HAS_SVGA),yes)
|
|||
SVGAQUAKE = $(BIN_PREFIX)-svga
|
||||
endif
|
||||
|
||||
ifeq ($(HAS_MGL),yes)
|
||||
MGLQUAKE = $(BIN_PREFIX)-mgl
|
||||
endif
|
||||
|
||||
ifeq ($(HAS_GGI),yes)
|
||||
GGIQUAKE = $(BIN_PREFIX)-ggi
|
||||
endif
|
||||
|
@ -81,7 +86,7 @@ else
|
|||
OPTFLAGS = -g
|
||||
endif
|
||||
|
||||
targets = $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE) $(SDLQUAKE)
|
||||
targets = $(MGLQUAKE) $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE) $(SDLQUAKE)
|
||||
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
|
||||
.PHONY: $(targets) ($CLEAN_TARGETS)
|
||||
|
||||
|
@ -97,7 +102,7 @@ ifeq ($(INTEL_ARCH),yes)
|
|||
UQ_GENERAL_SRC = worlda.s
|
||||
UQ_SWREND_SRC_PLAT = dosasm.s
|
||||
CL_ADDITIONAL_GENERAL_SRC = sys_dosa.s math.s
|
||||
SWREND_SRC_PLAT = d_copy.s d_draw.s d_draw16.s d_parta.s d_polysa.s d_scana.s \
|
||||
SWREND_SRC_PLAT = d_draw.s d_draw16.s d_parta.s d_polysa.s d_scana.s \
|
||||
d_spr8.s d_varsa.s r_aclipa.s r_aliasa.s \
|
||||
r_drawa.s r_edgea.s r_varsa.s surf16.s surf8.s
|
||||
else
|
||||
|
@ -249,6 +254,7 @@ clean-$(X11QUAKE):
|
|||
rm -f $(OBJSquake-x11)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# quake-svga
|
||||
|
@ -259,7 +265,7 @@ OBJSquake-svga= $(patsubst %,$(BUILD_DIR)/svga/%,$(addsuffix .@OBJEXT@, $(basena
|
|||
|
||||
SVGA_CFLAGS = @SVGA_CFLAGS@
|
||||
SVGA_LDFLAGS = @SVGA_LIBS@
|
||||
SVGA_VID_SRC = vid_svgalib.c
|
||||
SVGA_VID_SRC = vid_svgalib.c d_copy.s
|
||||
|
||||
# This can be thought of as a macro that makes sure that the x11
|
||||
# sub-directory is created
|
||||
|
@ -291,6 +297,7 @@ clean-$(SVGAQUAKE):
|
|||
rm -f $(OBJSquake-svga)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# quake-ggi
|
||||
|
@ -331,6 +338,52 @@ clean-$(GGIQUAKE):
|
|||
rm -f $(OBJSquake-ggi)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# quake-mgl
|
||||
#
|
||||
ifneq ($(MGLQUAKE),)
|
||||
|
||||
# Map the list of source files into a list of object files
|
||||
ALL_MGL_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(MGL_VID_SRC) model.c
|
||||
OBJSquake-mgl = $(patsubst %,$(BUILD_DIR)/mgl/%,$(addsuffix .@OBJEXT@, $(basename $(ALL_MGL_SRC) .c .s)))
|
||||
|
||||
MGL_CFLAGS = -DMGL @MGL_CFLAGS@
|
||||
MGL_LDFLAGS = @MGL_LIBS@ -lm
|
||||
MGL_VID_SRC = vid_win.c in_win.c conproc.c
|
||||
|
||||
# This can be thought of as a macro that makes sure that the mgl
|
||||
# sub-directory is created
|
||||
# XXX - can we avoid doing every compile?
|
||||
MAKE_SURE_mgl_DIR = @DIR=mgl; $(MAKE_SURE_DIR)
|
||||
|
||||
$(BUILD_DIR)/mgl/%.o: $(SRC_DIR)/%.c
|
||||
$(MAKE_SURE_mgl_DIR)
|
||||
$(CC) $(CFLAGS) $(MGL_CFLAGS) -o $@ -c $<
|
||||
|
||||
$(BUILD_DIR)/mgl/%.o: $(SRC_DIR)/%.s
|
||||
$(MAKE_SURE_mgl_DIR)
|
||||
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
||||
|
||||
$(BUILD_DIR)/mgl/%.o: $(COMMON_DIR)/%.c
|
||||
$(MAKE_SURE_mgl_DIR)
|
||||
$(CC) $(CFLAGS) $(MGL_CFLAGS) -o $@ -c $<
|
||||
|
||||
$(BUILD_DIR)/mgl/%.o: $(COMMON_DIR)/%.s
|
||||
$(MAKE_SURE_mgl_DIR)
|
||||
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
|
||||
|
||||
$(MGLQUAKE): $(BUILD_DIR)/../$(MGLQUAKE)
|
||||
|
||||
$(BUILD_DIR)/../$(MGLQUAKE): $(OBJSquake-mgl)
|
||||
$(CC) $(CFLAGS) $(OBJSquake-mgl) $(MGL_LDFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/../$(MGLQUAKE)
|
||||
# XXX - Can this be automated?
|
||||
clean-$(MGLQUAKE):
|
||||
rm -f $(OBJSquake-mgl)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# quake-gl
|
||||
|
@ -370,6 +423,7 @@ clean-$(GLQUAKE):
|
|||
rm -f $(OBJSquake-gl)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# quake-3dfx
|
||||
|
@ -447,6 +501,7 @@ clean-$(SDLQUAKE):
|
|||
rm -f $(OBJSquake-sdl)
|
||||
endif
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# cleaning (clean, distclean)
|
||||
|
|
Loading…
Reference in a new issue