mirror of
https://github.com/mars3142/gb-snake.git
synced 2026-03-12 19:49:05 +00:00
some build tools optimization
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
4
.github/workflows/push.yaml
vendored
4
.github/workflows/push.yaml
vendored
@@ -7,10 +7,10 @@ jobs:
|
|||||||
name: Build gbdk project
|
name: Build gbdk project
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: wujood/gbdk-2020-github-builder@1.0.7
|
uses: wujood/gbdk-2020-github-builder@1.0.8
|
||||||
with:
|
with:
|
||||||
subdirectory: ./src
|
subdirectory: ./src
|
||||||
output-name: gb-snake
|
output-name: gb-snake
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,3 +24,4 @@
|
|||||||
|
|
||||||
gen/
|
gen/
|
||||||
obj/
|
obj/
|
||||||
|
dist/
|
||||||
|
|||||||
7
.vscode/tasks.json
vendored
7
.vscode/tasks.json
vendored
@@ -19,6 +19,13 @@
|
|||||||
"showReuseMessage": true,
|
"showReuseMessage": true,
|
||||||
"clear": false
|
"clear": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "run Emulicious mit snake.gb",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "java -jar ~/SDK/Emulicious/Emulicious.jar dist/snake.gb",
|
||||||
|
"group": "test",
|
||||||
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
17
Makefile
17
Makefile
@@ -16,7 +16,6 @@ PNG2ASSET = $(GBDK_HOME)bin/png2asset
|
|||||||
# LCCFLAGS += -v # Uncomment for lcc verbose output
|
# LCCFLAGS += -v # Uncomment for lcc verbose output
|
||||||
LCCFLAGS +=-Wa-l -Wl-m -Wl-j -Wf--debug
|
LCCFLAGS +=-Wa-l -Wl-m -Wl-j -Wf--debug
|
||||||
|
|
||||||
|
|
||||||
# You can set the name of the .gb ROM file here
|
# You can set the name of the .gb ROM file here
|
||||||
PROJECTNAME = snake
|
PROJECTNAME = snake
|
||||||
|
|
||||||
@@ -56,10 +55,22 @@ $(OBJDIR)/%.s: $(SRCDIR)/%.c
|
|||||||
# Link the compiled object files into a .gb ROM file
|
# Link the compiled object files into a .gb ROM file
|
||||||
$(BINS): $(OBJS)
|
$(BINS): $(OBJS)
|
||||||
$(LCC) $(LCCFLAGS) -o $(BINS) $(OBJS)
|
$(LCC) $(LCCFLAGS) -o $(BINS) $(OBJS)
|
||||||
|
mv $(BINS) $(DSTDIR)
|
||||||
|
|
||||||
png2asset:
|
png2asset:
|
||||||
${PNG2ASSET} ${RESDIR}/splash_screen.png -c ${GENDIR}/splash_screen.c -map -source_tileset $(RESDIR)/splash_screen_tileset.png -noflip
|
@for f in $(RESDIR)/*.png; do \
|
||||||
${PNG2ASSET} ${RESDIR}/splash_screen_tileset.png -c ${GENDIR}/splash_screen_tileset.c -tiles_only -map -noflip
|
name=`basename "$$f" .png`; \
|
||||||
|
if echo "$$name" | grep -q '_tileset$$'; then \
|
||||||
|
${PNG2ASSET} "$$f" -c ${GENDIR}/"$$name".c -tiles_only -map -noflip; \
|
||||||
|
else \
|
||||||
|
tileset="$(RESDIR)/$${name}_tileset.png"; \
|
||||||
|
if [ -f "$$tileset" ]; then \
|
||||||
|
${PNG2ASSET} "$$f" -c ${GENDIR}/"$$name".c -source_tileset "$$tileset" -map -noflip; \
|
||||||
|
else \
|
||||||
|
${PNG2ASSET} "$$f" -c ${GENDIR}/"$$name".c -map -noflip; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
prepare:
|
prepare:
|
||||||
mkdir -p $(DSTDIR)
|
mkdir -p $(DSTDIR)
|
||||||
|
|||||||
Reference in New Issue
Block a user