blob: 86847e864a0224956ffc02f50a63a16cdc92bc5f (
plain)
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
|
include config.mk
SRC=src
WLDSRC=$(SRC)/wld
PKGS = fontconfig wayland-client wayland-cursor xkbcommon pixman-1 libdrm
SOURCES = $(wildcard $(WLDSRC)/*.c)
SOURCES += $(wildcard $(SRC)/*.c)
ifeq ($(ENABLE_INTEL),1)
PKGS += libdrm_intel
SOURCES += $(wildcard $(WLDSRC)/intel/*.c)
endif
ifeq ($(ENABLE_NOUVEAU),1)
PKGS += libdrm_nouveau
SOURCES += $(wildcard $(WLDSRC)/nouveau/*.c)
endif
CFLAGS = -std=c99 -Wall -Wextra
CFLAGS += $(shell pkg-config --cflags $(PKGS)) -I include -I $(WLDSRC)
LDFLAGS = $(shell pkg-config --libs $(PKGS))
OBJECTS = $(SOURCES:.c=.o)
WAYLAND_HEADERS = $(wildcard include/*.xml)
HDRS = $(WAYLAND_HEADERS:.xml=-client-protocol.h)
all: wterm
$(HDRS): $(WAYLAND_HEADERS)
wayland-scanner client-header < $< > $@
$(OBJECTS): $(HDRS)
wterm: $(OBJECTS)
$(CC) -o wterm $(OBJECTS) $(LDFLAGS)
clean:
rm -f $(OBJECTS) $(HDRS)
|