Update configuration method
This commit is contained in:
parent
aa4b0bea3f
commit
d551bc9d19
5
Makefile
5
Makefile
@ -3,11 +3,6 @@ CC := cc
|
||||
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
||||
LDFLAGS := -lX11
|
||||
|
||||
# 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
|
||||
|
||||
options:
|
||||
|
32
configure
vendored
32
configure
vendored
@ -1,17 +1,23 @@
|
||||
#!/bin/sh
|
||||
OS=$(uname)
|
||||
|
||||
sed -i 's/##/#/g' Makefile
|
||||
sed -i '7 s/^/#/' Makefile
|
||||
sed -i '9 s/^/#/' Makefile
|
||||
sed -i 's/##/#/g' Makefile
|
||||
case $OS in
|
||||
Linux) cp -f makefiles/Makefile.linux Makefile ;;
|
||||
OpenBSD) cp -f makefiles/Makefile.openbsd Makefile ;;
|
||||
FreeBSD) cp -f makefiles/Makefile.freebsd Makefile ;;
|
||||
esac
|
||||
|
||||
if [ "$OS" = "Linux " ]; then
|
||||
true
|
||||
else if [ "$OS" = "FreeBSD" ]; then
|
||||
sed -i '7 s/.//' Makefile
|
||||
else if [ "$OS" = "OpenBSD" ]; then
|
||||
sed -i '9 s/.//' Makefile
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
#sed -i 's/##/#/g' Makefile
|
||||
#sed -i '7 s/^/#/' Makefile
|
||||
#sed -i '9 s/^/#/' Makefile
|
||||
#sed -i 's/##/#/g' Makefile
|
||||
#
|
||||
#if [ "$OS" = "Linux " ]; then
|
||||
# true
|
||||
#else if [ "$OS" = "FreeBSD" ]; then
|
||||
# sed -i '7 s/.//' Makefile
|
||||
#else if [ "$OS" = "OpenBSD" ]; then
|
||||
# sed -i '9 s/.//' Makefile
|
||||
#fi
|
||||
#fi
|
||||
#fi
|
30
makefiles/Makefile.freebsd
Normal file
30
makefiles/Makefile.freebsd
Normal file
@ -0,0 +1,30 @@
|
||||
PREFIX := /usr/local
|
||||
CC := cc
|
||||
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
||||
LDFLAGS := -lX11
|
||||
|
||||
LDFLAGS += -L/usr/local/lib -I/usr/local/include
|
||||
|
||||
all: options dwmblocks
|
||||
|
||||
options:
|
||||
@echo dwmblocks build options:
|
||||
@echo "CFLAGS = ${CFLAGS}"
|
||||
@echo "LDFLAGS = ${LDFLAGS}"
|
||||
@echo "CC = ${CC}"
|
||||
|
||||
dwmblocks: dwmblocks.c blocks.h
|
||||
${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS}
|
||||
|
||||
clean:
|
||||
rm -f *.o *.gch dwmblocks
|
||||
|
||||
install: dwmblocks
|
||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
|
||||
chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
|
||||
|
||||
uninstall:
|
||||
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks
|
||||
|
||||
.PHONY: all options clean install uninstall
|
28
makefiles/Makefile.linux
Normal file
28
makefiles/Makefile.linux
Normal file
@ -0,0 +1,28 @@
|
||||
PREFIX := /usr/local
|
||||
CC := cc
|
||||
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
||||
LDFLAGS := -lX11
|
||||
|
||||
all: options dwmblocks
|
||||
|
||||
options:
|
||||
@echo dwmblocks build options:
|
||||
@echo "CFLAGS = ${CFLAGS}"
|
||||
@echo "LDFLAGS = ${LDFLAGS}"
|
||||
@echo "CC = ${CC}"
|
||||
|
||||
dwmblocks: dwmblocks.c blocks.h
|
||||
${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS}
|
||||
|
||||
clean:
|
||||
rm -f *.o *.gch dwmblocks
|
||||
|
||||
install: dwmblocks
|
||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
|
||||
chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
|
||||
|
||||
uninstall:
|
||||
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks
|
||||
|
||||
.PHONY: all options clean install uninstall
|
30
makefiles/Makefile.openbsd
Normal file
30
makefiles/Makefile.openbsd
Normal file
@ -0,0 +1,30 @@
|
||||
PREFIX := /usr/local
|
||||
CC := cc
|
||||
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
||||
LDFLAGS := -lX11
|
||||
|
||||
LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include
|
||||
|
||||
all: options dwmblocks
|
||||
|
||||
options:
|
||||
@echo dwmblocks build options:
|
||||
@echo "CFLAGS = ${CFLAGS}"
|
||||
@echo "LDFLAGS = ${LDFLAGS}"
|
||||
@echo "CC = ${CC}"
|
||||
|
||||
dwmblocks: dwmblocks.c blocks.h
|
||||
${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS}
|
||||
|
||||
clean:
|
||||
rm -f *.o *.gch dwmblocks
|
||||
|
||||
install: dwmblocks
|
||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
|
||||
chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
|
||||
|
||||
uninstall:
|
||||
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks
|
||||
|
||||
.PHONY: all options clean install uninstall
|
Loading…
x
Reference in New Issue
Block a user