Merge pull request #97 from wolfysdl/master

Add new makefile to tyra
This commit is contained in:
Sandro Sobczyński
2021-11-22 20:15:26 +01:00
committed by GitHub
5 changed files with 95 additions and 12 deletions
+9 -9
View File
@@ -21,7 +21,7 @@ jobs:
apk add build-base git
- name: Compile engine
working-directory: ./src/engine
working-directory: ./
env:
ZLIB: ${PS2SDK}/ports
LIBTIFF: ${PS2SDK}/ports
@@ -29,32 +29,32 @@ jobs:
LIBPNG: ${PS2SDK}/ports
TYRA: ${GITHUB_WORKSPACE}
run: |
make
make
- name: Compile unit test project
working-directory: ./src/unit_tests/
env:
TYRA: ${GITHUB_WORKSPACE}
run: |
make
make
- name: Compile cube project
working-directory: ./src/samples/cube/
working-directory: ./
env:
TYRA: ${GITHUB_WORKSPACE}
run: |
make
make cube
- name: Compile floors project
working-directory: ./src/samples/floors/
working-directory: ./
env:
TYRA: ${GITHUB_WORKSPACE}
run: |
make
make floors
- name: Compile dolphin project
working-directory: ./src/samples/dolphin/
working-directory: ./
env:
TYRA: ${GITHUB_WORKSPACE}
run: |
make
make dolphin
+83
View File
@@ -0,0 +1,83 @@
# ______ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2021, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# André Guilherme <andregui17@outlook.com>
TYRA_DIR = ./
LIB_NAME = libtyra.a
# ENGINE OBJECTS
ENGINE_OBJS = src/engine/engine.o \
src/engine/modules/audio.o \
src/engine/modules/camera_base.o \
src/engine/modules/file_service.o \
src/engine/modules/gif_sender.o \
src/engine/modules/light.o \
src/engine/modules/pad.o \
src/engine/modules/renderer.o \
src/engine/modules/texture_repository.o \
src/engine/modules/timer.o \
src/engine/modules/vif_sender.o \
src/engine/models/math/matrix.o \
src/engine/models/math/plane.o \
src/engine/models/math/point.o \
src/engine/models/math/vector3.o \
src/engine/models/mesh_frame.o \
src/engine/models/bounding_box.o \
src/engine/models/mesh_material.o \
src/engine/models/mesh.o \
src/engine/models/sprite.o \
src/engine/models/texture.o \
src/engine/utils/math.o \
src/engine/utils/string.o \
src/engine/loaders/bmp_loader.o \
src/engine/loaders/dff_loader.o \
src/engine/loaders/md2_loader.o \
src/engine/loaders/obj_loader.o \
src/engine/loaders/png_loader.o \
src/engine/vu1_progs/draw3D.o \
EE_LIBS := $(EE_LIBS) -ldraw -lcdvd -lgraph -lmath3d -lpacket -ldma -lpacket2 -lpad -laudsrv -lc -lstdc++ -lpng -lz
EE_INCS := -I$(TYRA)/src/engine/include -I$(PS2SDK)/ports/include $(EE_INCS)
EE_LDFLAGS := -L$(PS2SDK)/ports/lib -L$(TYRA)/src/engine $(EE_LDFLAGS)
EE_CXXFLAGS := -DHAVE_LIBJPEG -DHAVE_LIBTIFF -DHAVE_LIBPNG -DHAVE_ZLIB -D_XCDVD $(EE_CXXFLAGS)
EE_DVP = dvp-as
EE_VCL = vcl
EE_VCLPP = vclpp
all: $(ENGINE_OBJS)
ar rcs $(LIB_NAME) $(ENGINE_OBJS)
cp -f $(LIB_NAME) $(PS2SDK)/ee/lib
rm -f $(ENGINE_OBJS)
# cube example
cube:
$(MAKE) -C src/samples/cube all clean
# dolphin example
dolphin:
$(MAKE) -C src/samples/dolphin all clean
# floors example
floors:
$(MAKE) -C src/samples/floors all clean
# %.vcl: %.vclpp
# $(EE_VCLPP) $< $@
# %.vsm: %.vcl
# $(EE_VCL) $< >> $@
%.o: %.vsm
$(EE_DVP) $< -o $@
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
+1 -1
View File
@@ -48,4 +48,4 @@ clean:
rm -f $(EE_OBJS)
rm -f $(LIB_NAME)
include Makefile.pref
include Makefile.pref
+1 -1
View File
@@ -8,4 +8,4 @@ EE_VCLPP = vclpp
LIB_NAME = libtyra.a
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
include $(PS2SDK)/samples/Makefile.eeglobal
+1 -1
View File
@@ -36,4 +36,4 @@ run-pcsx2:
taskkill.exe /f /t /im pcsx2.exe || true
$(WSL_LINUX_PCSX2)/pcsx2.exe --elf=$(WSL_MAKE_WINDOWS)\\repos\\tyra\\src\\samples\\$(DIR_NAME)\\bin\\$(EE_BIN)
include $(TYRA)/src/engine/Makefile.pref
include $(TYRA)/src/engine/Makefile.pref