diff options
Diffstat (limited to 'dwbem/Makefile')
-rw-r--r-- | dwbem/Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/dwbem/Makefile b/dwbem/Makefile new file mode 100644 index 00000000..059703f2 --- /dev/null +++ b/dwbem/Makefile @@ -0,0 +1,39 @@ +# See COPYING for copyright and license details + +include ../config.mk +TARGET=dwbem + +BASEDIR = .. + +CFLAGS += -I$(BASEDIR)/$(DWB_LIB_DIRS) + +OBJ = $(patsubst %.c, %.o, $(wildcard *.c)) $(BASEDIR)/$(OBJLIB) + + +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) -o $@ + @$(CC) $(OBJ) -o $@ $(LDFLAGS) + +%.o: %.c + @echo $(CC) $< + @$(CC) $(CFLAGS) -c $< -o $@ $(CPPFLAGS) + +clean: + rm -f $(TARGET) $(OBJ) + +.PHONY: clean |