summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile65
1 files changed, 56 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 1fb689f3..83514a24 100644
--- a/Makefile
+++ b/Makefile
@@ -992,6 +992,14 @@ $(echo_cmd) "REF_CC $<"
$(Q)$(CC) $(SHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
endef
+define DO_REF_STR
+$(echo_cmd) "REF_STR $<"
+$(Q)rm -f $@
+$(Q)echo "const char *fallbackShader_$(notdir $(basename $<)) =" >> $@
+$(Q)cat $< | sed 's/\\/\\\\/;s/\t/\\t/;s/\"/\\"/;s/$$/\\n"/;s/^/"/' >> $@
+$(Q)echo ";" >> $@
+endef
+
define DO_SMP_CC
$(echo_cmd) "SMP_CC $<"
$(Q)$(CC) $(SHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -DSMP -o $@ -c $<
@@ -1132,6 +1140,7 @@ makedirs:
@if [ ! -d $(B)/client ];then $(MKDIR) $(B)/client;fi
@if [ ! -d $(B)/renderer ];then $(MKDIR) $(B)/renderer;fi
@if [ ! -d $(B)/rend2 ];then $(MKDIR) $(B)/rend2;fi
+ @if [ ! -d $(B)/rend2/glsl ];then $(MKDIR) $(B)/rend2/glsl;fi
@if [ ! -d $(B)/renderersmp ];then $(MKDIR) $(B)/renderersmp;fi
@if [ ! -d $(B)/ded ];then $(MKDIR) $(B)/ded;fi
@if [ ! -d $(B)/$(BASEGAME) ];then $(MKDIR) $(B)/$(BASEGAME);fi
@@ -1421,6 +1430,36 @@ Q3R2OBJ = \
$(B)/rend2/tr_world.o \
\
$(B)/renderer/sdl_gamma.o
+
+Q3R2STRINGOBJ = \
+ $(B)/rend2/glsl/bokeh_fp.o \
+ $(B)/rend2/glsl/bokeh_vp.o \
+ $(B)/rend2/glsl/calclevels4x_fp.o \
+ $(B)/rend2/glsl/calclevels4x_vp.o \
+ $(B)/rend2/glsl/depthblur_fp.o \
+ $(B)/rend2/glsl/depthblur_vp.o \
+ $(B)/rend2/glsl/dlight_fp.o \
+ $(B)/rend2/glsl/dlight_vp.o \
+ $(B)/rend2/glsl/down4x_fp.o \
+ $(B)/rend2/glsl/down4x_vp.o \
+ $(B)/rend2/glsl/fogpass_fp.o \
+ $(B)/rend2/glsl/fogpass_vp.o \
+ $(B)/rend2/glsl/generic_fp.o \
+ $(B)/rend2/glsl/generic_vp.o \
+ $(B)/rend2/glsl/lightall_fp.o \
+ $(B)/rend2/glsl/lightall_vp.o \
+ $(B)/rend2/glsl/pshadow_fp.o \
+ $(B)/rend2/glsl/pshadow_vp.o \
+ $(B)/rend2/glsl/shadowfill_fp.o \
+ $(B)/rend2/glsl/shadowfill_vp.o \
+ $(B)/rend2/glsl/shadowmask_fp.o \
+ $(B)/rend2/glsl/shadowmask_vp.o \
+ $(B)/rend2/glsl/ssao_fp.o \
+ $(B)/rend2/glsl/ssao_vp.o \
+ $(B)/rend2/glsl/texturecolor_fp.o \
+ $(B)/rend2/glsl/texturecolor_vp.o \
+ $(B)/rend2/glsl/tonemap_fp.o \
+ $(B)/rend2/glsl/tonemap_vp.o
Q3ROBJ = \
$(B)/renderer/tr_animation.o \
@@ -1686,14 +1725,14 @@ $(B)/renderer_opengl1_smp_$(SHLIBNAME): $(Q3ROBJ) $(Q3RPOBJ_SMP) $(JPGOBJ)
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3ROBJ) $(Q3RPOBJ_SMP) $(JPGOBJ) \
$(THREAD_LIBS) $(LIBSDLMAIN) $(RENDERER_LIBS) $(LIBS)
-$(B)/renderer_rend2_$(SHLIBNAME): $(Q3R2OBJ) $(Q3RPOBJ_UP) $(JPGOBJ)
+$(B)/renderer_rend2_$(SHLIBNAME): $(Q3R2OBJ) $(Q3R2STRINGOBJ) $(Q3RPOBJ_UP) $(JPGOBJ)
$(echo_cmd) "LD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3R2OBJ) $(Q3RPOBJ_UP) $(Q3RPOBJ_SMP) $(Q3DOBJ) $(JPG
$(GOBJ) $(CGOBJ) $(UIOBJ) \
$(GVMOBJ) $(CGVMOBJ) $(UIVMOBJ)
TOOLSOBJ = $(LBURGOBJ) $(Q3CPPOBJ) $(Q3RCCOBJ) $(Q3LCCOBJ) $(Q3ASMOBJ)
+STRINGOBJ = $(Q3R2STRINGOBJ)
clean: clean-debug clean-release
@$(MAKE) -C $(MASTERDIR) clean
@@ -2165,6 +2211,7 @@ clean2:
@echo "CLEAN $(B)"
@rm -f $(OBJ)
@rm -f $(OBJ_D_FILES)
+ @rm -f $(STRINGOBJ)
@rm -f $(TARGETS)
toolsclean: toolsclean-debug toolsclean-release