From 50e382e5efe6bdad568a507e7ec675e27e94d428 Mon Sep 17 00:00:00 2001 From: clsr Date: Sat, 28 Dec 2019 21:47:52 +0100 Subject: Clean up makefile --- Makefile | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 753018d..5133980 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,19 @@ -include config.mk +CC? = cc +MAIN = dwmclock +SRC = dwmclock.c +OBJ = $(SRC:.c=.o) +CFLAGS := -std=c99 -Wall -Wextra -pedantic -Os $(shell pkg-config --cflags x11) $(CFLAGS) +LDFLAGS := $(shell pkg-config --libs x11) $(LDFLAGS) + +# install in /usr/local/bin +DESTDIR ?= / +PREFIX ?= /usr/local -MAIN=dwmclock -SRC=dwmclock.c -OBJ=$(SRC:.c=.o) +# install in ~/.local/bin +#DESTDIR ?= ~ +#PREFIX ?= /.local + +include config.mk all: $(SRC) $(MAIN) -- cgit