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