mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-19 05:25:45 +01:00
Compare commits
6 Commits
82ebe1f4d1
...
8443d786e5
| Author | SHA1 | Date | |
|---|---|---|---|
| 8443d786e5 | |||
| f205a0e9aa | |||
| 03daaf86e8 | |||
| af9ae6d4f2 | |||
| 0c59b3066b | |||
| 7677c7e047 |
3
.github/workflows/ci.yaml
vendored
3
.github/workflows/ci.yaml
vendored
@@ -25,13 +25,12 @@ jobs:
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y libwayland-dev libxkbcommon-dev xorg-dev cmake xxd
|
||||
sudo apt install -y libwayland-dev libxkbcommon-dev xorg-dev cmake
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: lib/obj/
|
||||
# I swear to god, if runner.arch displays x64 for x86_64, I will eat a potato.
|
||||
# note: it is... fucking shit.
|
||||
key: ${{runner.os}}_${{runner.arch}}-lib/obj-${{github.sha}}
|
||||
restore-keys: ${{runner.os}}_${{runner.arch}}-lib/obj-
|
||||
- run: make -Bj libs
|
||||
|
||||
20
Makefile
20
Makefile
@@ -5,6 +5,7 @@
|
||||
NAME = mcaselector-lite
|
||||
DEBUG ?= 0
|
||||
CC ?= cc
|
||||
LD ?= cc
|
||||
|
||||
# setting default compilation flags
|
||||
# some of which are able to be overwritten, others are always appended
|
||||
@@ -48,16 +49,11 @@ all: bin/$(NAME)
|
||||
libs: lib/obj/glfw/ lib/obj/libarchive/
|
||||
test: bin/TEST_$(NAME); bin/TEST_$(NAME)
|
||||
clean:
|
||||
ifneq ($(wildcard bin/),)
|
||||
rm -vr bin/
|
||||
endif
|
||||
ifneq ($(wildcard obj/),)
|
||||
rm -vr obj/
|
||||
endif
|
||||
@[ -d bin/ ] && rm -vr bin/ || true
|
||||
@[ -d obj/ ] && rm -vr obj/ || true
|
||||
clean-libs:
|
||||
ifneq ($(wildcard lib/obj/),)
|
||||
rm -vr lib/obj/
|
||||
endif
|
||||
@[ -d lib/obj/ ] && rm -vr lib/obj/ || true
|
||||
|
||||
|
||||
# compiles the libraries using cmake
|
||||
lib/obj/%/: lib/%/
|
||||
@@ -68,18 +64,18 @@ lib/obj/%/: lib/%/
|
||||
bin/$(NAME): $(OBJ)
|
||||
$(info [LD] $@)
|
||||
@mkdir -p $(@D)
|
||||
@$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
||||
@$(LD) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
# link together a testing binary
|
||||
bin/TEST_$(NAME): $(TOBJ) $(filter-out obj/src/main.o,$(OBJ))
|
||||
$(info [LD] $@)
|
||||
@mkdir -p $(@D)
|
||||
@$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
||||
@$(LD) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
obj/res/%.c: res/%
|
||||
$(info [XXD] $@)
|
||||
@mkdir -p $(@D)
|
||||
@cd res/ && xxd -i $(patsubst res/%,%,$<) $(abspath $@)
|
||||
@xxd -i -n $(patsubst res/%,%,$<) $< $@
|
||||
|
||||
obj/res/%.o: obj/res/%.c
|
||||
$(info [CC] $@)
|
||||
|
||||
Reference in New Issue
Block a user