blob: f1e2dab298bb91c54a5f7660b782ba804d6918a0 (
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
|
TARGET=dwbem
OBJ = $(patsubst %.c, %.o, $(wildcard *.c))
LIBS=libsoup-2.4 glib-2.0
PREFIX ?= /usr
SYSTEM_EXTENSION_DIR=$(PREFIX)/share/dwb/extensions
CFLAGS := $(CFLAGS)
CFLAGS += -std=c99 -g
CFLAGS += -Wall
CFLAGS += $(shell pkg-config --cflags $(LIBS))
CFLAGS += -DSYSTEM_EXTENSION_DIR=\"$(SYSTEM_EXTENSION_DIR)\"
LDFLAGS := $(LDFLAGS)
LDFLAGS += -lreadline
LDFLAGS += $(shell pkg-config --libs $(LIBS))
all: $(TARGET)
dwb_em: dwb_em.in
@echo gen $@
$(shell sed 's#@SYSTEM_DIR@#$(DATADIR)/$(REAL_NAME)/$(EXTENSIONDIR)#' $< > $@)
@chmod 755 $@
$(TARGET): $(OBJ)
@echo $(CC) $@
@$(CC) $< -o $@ $(LDFLAGS)
%.o: %.c
@echo $(CC) $<
@$(CC) $(CFLAGS) -c $< -o $@ $(CPPFLAGS)
clean:
rm -f $(TARGET)
.PHONY: clean
|