Initial commit

This commit is contained in:
2026-05-30 15:05:58 +10:00
commit 2bc38d7587
11 changed files with 5722 additions and 0 deletions

29
Makefile Normal file
View File

@@ -0,0 +1,29 @@
HEADER = src/marl.h
CC = cc
TARGET = libmarl.so
FLAGS = -shared -fPIC
SRCS_X11 = src/x11/marl.c
FLAGS_X11 = -lxcb -lm
PREFIX ?= /usr/local
DESTDIR ?=
.PHONY: default
default: x11
.PHONY: x11
x11: $(SRCS_X11)
$(CC) $(SRCS_X11) $(FLAGS_X11) $(FLAGS) -o $(TARGET)
.PHONY: clean
clean:
rm $(TARGET)
.PHONY: install
install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/include $(DESTDIR)$(PREFIX)/lib
cp $(HEADER) $(DESTDIR)$(PREFIX)/include/
cp $(TARGET) $(DESTDIR)$(PREFIX)/lib/
echo "$(DESTDIR)$(PREFIX)/lib" | tee $(DESTDIR)/etc/ld.so.conf.d/marl.conf
ldconfig