2024-08-14 17:27:59 +03:00
|
|
|
DEPS =
|
|
|
|
DEPS += libevdev
|
2024-08-14 23:23:21 +03:00
|
|
|
DEPS += libconfig
|
2024-08-14 00:33:52 +03:00
|
|
|
CFLAGS = -Wall -Wextra
|
|
|
|
ifdef DEBUG
|
|
|
|
CFLAGS += -Og -gdwarf-2
|
|
|
|
CPPFLAGS += -D DEBUG
|
|
|
|
else
|
|
|
|
CFLAGS += -O2
|
|
|
|
endif
|
|
|
|
CPPFLAGS += $(shell pkg-config --cflags $(DEPS))
|
|
|
|
LDLIBS += $(shell pkg-config --libs $(DEPS))
|
|
|
|
INTERP ?=
|
|
|
|
MAIN = main
|
2024-08-19 22:26:10 +03:00
|
|
|
OBJS = main.o events.o processing.o graph.o config.o event_code_names.o hash_table.o queue.o module_registry.o event_predicate.o nodes/getchar.o nodes/print.o nodes/evdev.o nodes/tee.o nodes/router.o nodes/modifiers.o nodes/modify_predicate.o nodes/uinput.o nodes/assign.o nodes/differentiate.o nodes/scale.o nodes/window.o
|
2024-08-14 00:33:52 +03:00
|
|
|
|
|
|
|
all: $(MAIN)
|
|
|
|
|
|
|
|
run: $(MAIN)
|
|
|
|
$(INTERP) ./$(MAIN)
|
|
|
|
|
|
|
|
.PHONY: all run
|
|
|
|
|
|
|
|
$(MAIN): $(OBJS)
|
|
|
|
$(CC) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
|