-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
43 lines (30 loc) · 1.92 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.POSIX:
.SUFFIXES: .c .o
include config.mk
TARGET=soilleir
COBJS=src/egl.o src/input/libinput.o src/swl-screenshot-server.o src/drm/drm.o src/hotplug/udev.o src/sessions/seatd.o src/xdg-shell-server.o tests/server.o src/logger.o src/interfaces/swl_compositor.o src/interfaces/swl_data_dev_man.o
CLIBSFLAGS=`pkg-config --cflags gbm xkbcommon wayland-server libseat libudev libinput libdrm glesv2 egl`
CLIBS=`pkg-config --libs gbm xkbcommon wayland-server libseat libudev libinput libdrm egl glesv2`
all: src/swl-screenshot-server.h src/xdg-shell-server.h $(TARGET) screenshot ipc-cli
ipc-cli: ./tests/ipc.c
$(CC) ./tests/ipc.c `pkg-config --cflags libdrm libpng` -o $@ `pkg-config --libs libpng`
tests/swl-screenshot-client.h: ./protocols/swl-screenshot-unstable-v1.xml
$(WAYLAND_SCANNER) client-header ./protocols/swl-screenshot-unstable-v1.xml $@
tests/swl-screenshot-client.c: ./protocols/swl-screenshot-unstable-v1.xml
$(WAYLAND_SCANNER) private-code ./protocols/swl-screenshot-unstable-v1.xml $@
screenshot: ./tests/screenshot.c tests/swl-screenshot-client.c tests/swl-screenshot-client.h
$(CC) $(CFLAGS) -o $@ ./tests/screenshot.c ./tests/swl-screenshot-client.c -lwayland-client -lpng
src/swl-screenshot-server.h: ./protocols/swl-screenshot-unstable-v1.xml
$(WAYLAND_SCANNER) server-header ./protocols/swl-screenshot-unstable-v1.xml $@
src/swl-screenshot-server.c: ./protocols/swl-screenshot-unstable-v1.xml
$(WAYLAND_SCANNER) private-code ./protocols/swl-screenshot-unstable-v1.xml $@
src/xdg-shell-server.h:
$(WAYLAND_SCANNER) server-header $(WAYLAND_DIR)/stable/xdg-shell/xdg-shell.xml $@
src/xdg-shell-server.c:
$(WAYLAND_SCANNER) private-code $(WAYLAND_DIR)/stable/xdg-shell/xdg-shell.xml $@
.c.o:
$(CC) -c $(CLIBSFLAGS) $(CFLAGS) -o $@ $<
$(TARGET): $(INCLUDES) $(COBJS) tests/server.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COBJS) $(CLIBS)
clean:
rm -rf bg-set screenshot src/xdg-shell.h src/xdg-shell.c $(COBJS) $(TARGET)