Update Makefile and add config.mk
This commit is contained in:
parent
89073bf8bd
commit
316e32a6a5
20
Makefile
20
Makefile
@ -1,30 +1,16 @@
|
|||||||
PREFIX := /usr/local
|
include config.mk
|
||||||
CC := cc
|
|
||||||
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
|
||||||
LDFLAGS := -lX11
|
|
||||||
PULSEFLAGS := -lpulse
|
|
||||||
NO_X := 0
|
|
||||||
|
|
||||||
ifeq ($(NO_X), 1)
|
|
||||||
CFLAGS := $(CFLAGS) -DNO_X
|
|
||||||
endif
|
|
||||||
|
|
||||||
# FreeBSD (uncomment)
|
|
||||||
#LDFLAGS += -L/usr/local/lib -I/usr/local/include
|
|
||||||
# # OpenBSD (uncomment)
|
|
||||||
#LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include
|
|
||||||
|
|
||||||
all: options dwmblocks
|
all: options dwmblocks
|
||||||
|
|
||||||
options:
|
options:
|
||||||
@echo dwmblocks build options:
|
@echo dwmblocks build options:
|
||||||
@echo "CFLAGS = ${CFLAGS}"
|
@echo "CFLAGS = ${CFLAGS} ${NO_X}"
|
||||||
@echo "LDFLAGS = ${LDFLAGS}"
|
@echo "LDFLAGS = ${LDFLAGS}"
|
||||||
@echo "CC = ${CC}"
|
@echo "CC = ${CC}"
|
||||||
@echo "PULSEFLAGS = ${PULSEFLAGS}"
|
@echo "PULSEFLAGS = ${PULSEFLAGS}"
|
||||||
|
|
||||||
dwmblocks: dwmblocks.c pulse-listener.c blocks.def.h blocks.h
|
dwmblocks: dwmblocks.c pulse-listener.c blocks.def.h blocks.h
|
||||||
${CC} -o dwmblocks dwmblocks.c pulse-listener.c ${CFLAGS} ${PULSEFLAGS} ${LDFLAGS}
|
${CC} ${NO_X} -o dwmblocks dwmblocks.c pulse-listener.c ${CFLAGS} ${PULSEFLAGS} ${LDFLAGS}
|
||||||
|
|
||||||
blocks.h:
|
blocks.h:
|
||||||
cp blocks.def.h $@
|
cp blocks.def.h $@
|
||||||
|
14
config.mk
Normal file
14
config.mk
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
PREFIX := /usr/local
|
||||||
|
CC := cc
|
||||||
|
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
||||||
|
LDFLAGS := -lX11
|
||||||
|
PULSEFLAGS := -lpulse
|
||||||
|
|
||||||
|
NO_X =
|
||||||
|
# Uncomment to build without X11
|
||||||
|
NO_X = -DNO_X
|
||||||
|
|
||||||
|
# FreeBSD (uncomment)
|
||||||
|
#LDFLAGS += -L/usr/local/lib -I/usr/local/include
|
||||||
|
# # OpenBSD (uncomment)
|
||||||
|
#LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include
|
Loading…
Reference in New Issue
Block a user