summaryrefslogtreecommitdiff
path: root/tools/Makefile
blob: 73eabf6f34d58cf3c39f6a844376350ca4041635 (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
# See COPYING for copyright and license details

include ../config.mk
TARGET=dwbem

OBJ = $(patsubst %.c, %.o, $(wildcard *.c))
LIBS=libsoup-2.4 glib-2.0

SYSTEM_EXTENSION_DIR=$(PREFIX)/share/dwb/extensions

CFLAGS := $(CFLAGS)
CFLAGS += -std=c99 
CFLAGS += -Wall -g
CFLAGS += -Wextra -Werror=format-security 
CFLAGS += $(shell pkg-config --cflags $(LIBS))
CFLAGS += -DSYSTEM_EXTENSION_DIR=\"$(SYSTEM_EXTENSION_DIR)\"


LDFLAGS := $(LDFLAGS)
LDFLAGS += $(shell pkg-config --libs $(LIBS))

all: $(TARGET)

$(TARGET): $(OBJ)
	@echo $(CC) $@
	@$(CC) $< -o $@ $(LDFLAGS)

%.o: %.c
	@echo $(CC) $<
	@$(CC) $(CFLAGS) -c $< -o $@ $(CPPFLAGS)

clean: 
	rm -f $(TARGET) $(OBJ)

.PHONY: clean