24 lines
533 B
Makefile
Executable File
24 lines
533 B
Makefile
Executable File
CC = gcc
|
|
CFLAGS = -Wall -Wshadow -Werror -I/usr/include/libdrm
|
|
LDFLAGS = -lc -ldrm
|
|
|
|
SRCS := $(wildcard src/modules/*.c)
|
|
OBJS := $(patsubst src/modules/%.c,%,$(SRCS))
|
|
MODS := $(patsubst src/modules/%.c,%.so,$(SRCS))
|
|
|
|
%:
|
|
mkdir -p build/modules
|
|
$(CC) $(CFLAGS) src/modules/$@.c -o build/modules/$@.so -shared -fPIC -rdynamic -g
|
|
|
|
all: $(OBJS)
|
|
gcc -std=c23 -g -o build/twm src/core/*.c $(CFLAGS) $(LDFLAGS) -ldl
|
|
|
|
clean:
|
|
rm -rf build/*
|
|
|
|
run: all
|
|
cd build; ./twm drm fb uevent ; cd -
|
|
|
|
run_fb: all
|
|
cd build; ./twm fb drm uevent ; cd -
|