Skip to content

Commit 6b36d7a

Browse files
committed
Makefile: add VCL to VSM targets
NOTE: Requires 'gasp', the gnu assembler preprocessor. This is a difficult to find tool. I managed to build it from the sources at: https://github.com/matrach/gasp
1 parent 055fa98 commit 6b36d7a

File tree

2 files changed

+43
-26
lines changed

2 files changed

+43
-26
lines changed

Makefile

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ EE_LDFLAGS += -L. -L$(PS2SDK)/ports/lib
44
EE_INCS += -I./include -I./vu1 -I$(PS2SDK)/ports/include
55

66
ifeq ($(DEBUG), 1)
7-
EE_CFLAGS += -D_DEBUG -g -O0
8-
EE_CXXFLAGS += -D_DEBUG -g -O0
7+
EE_CFLAGS += -D_DEBUG
8+
EE_CXXFLAGS += -D_DEBUG
99
endif
1010

1111
# Disabling warnings
@@ -37,22 +37,26 @@ EE_OBJS = \
3737
src/renderermanager.o \
3838
src/texture.o
3939

40-
EE_OBJS += \
41-
vu1/fast_nolights.vo \
42-
vu1/fast.vo \
43-
vu1/general_nospec_quad.vo \
44-
vu1/general_nospec_tri.vo \
45-
vu1/general_nospec.vo \
46-
vu1/general_pv_diff_quad.vo \
47-
vu1/general_pv_diff_tri.vo \
48-
vu1/general_pv_diff.vo \
49-
vu1/general_quad.vo \
50-
vu1/general_tri.vo \
51-
vu1/general.vo \
52-
vu1/indexed.vo \
53-
vu1/scei.vo
54-
55-
all: $(EE_LIB)
40+
RENDERERS = \
41+
fast_nolights \
42+
fast \
43+
general_nospec_quad \
44+
general_nospec_tri \
45+
general_nospec \
46+
general_pv_diff_quad \
47+
general_pv_diff_tri \
48+
general_pv_diff \
49+
general_quad \
50+
general_tri \
51+
general \
52+
indexed \
53+
scei
54+
55+
EE_OBJS += $(addsuffix .vo, $(addprefix vu1/, $(RENDERERS)))
56+
57+
VSM_SOURCES = $(addsuffix _vcl.vsm, $(addprefix vu1/, $(RENDERERS)))
58+
59+
all: $(VSM_SOURCES) $(EE_LIB)
5660

5761
install: all
5862
mkdir -p $(PS2SDK)/ports/include
@@ -67,15 +71,28 @@ clean:
6771
realclean: clean
6872
rm -rf $(PS2SDK)/ports/include/ps2gl
6973
rm -f $(PS2SDK)/ports/lib/$(EE_LIB)
74+
rm -f $(VSM_SOURCES)
7075

7176
include $(PS2SDK)/Defs.make
7277
include $(PS2SDK)/samples/Makefile.eeglobal
7378

74-
#%.vsm: %.pp.vcl
75-
# openvcl -o $@ $<
76-
77-
#%.pp.vcl: %.vcl
78-
# vclpp $< $@ -j
79-
8079
%.vo: %_vcl.vsm
8180
dvp-as -o $@ $<
81+
82+
%_vcl.vsm: %_pp4.vcl
83+
vcl -o$@ $<
84+
85+
%indexed_pp4.vcl: %indexed_pp3.vcl
86+
cat $< | cc -E -P -imacros vu1/vu1_mem_indexed.h -o $@ -
87+
88+
%_pp4.vcl: %_pp3.vcl
89+
cat $< | cc -E -P -imacros vu1/vu1_mem_linear.h -o $@ -
90+
91+
%_pp3.vcl: %_pp2.vcl
92+
cat $< | sed 's/\[\([0-9]\)\]/_\1/g ; s/\[\([w-zW-Z]\)\]/\1/g' - > $@
93+
94+
%_pp2.vcl: %_pp1.vcl
95+
gasp -c ';' -Ivu1 -o $@ $<
96+
97+
%_pp1.vcl: %.vcl
98+
cat $< | sed 's/#include[ ]\+.\+// ; s/#define[ ]\+.\+// ; s|\(\.include[ ]\+\)"\([^/].\+\)"|\1"$(<D)/\2"|' - > $@

glut/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ EE_LDFLAGS += -L. -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib
44
EE_INCS += -I./include -I$(PS2SDK)/ports/include -I$(PS2DEV)/gsKit/include
55

66
ifeq ($(DEBUG), 1)
7-
EE_CFLAGS += -D_DEBUG -g -O0
8-
EE_CXXFLAGS += -D_DEBUG -g -O0
7+
EE_CFLAGS += -D_DEBUG
8+
EE_CXXFLAGS += -D_DEBUG
99
endif
1010

1111
# Disabling warnings

0 commit comments

Comments
 (0)