archy-dwm/Makefile

66 lines
1.6 KiB
Makefile
Raw Normal View History

2006-07-13 07:32:22 +00:00
# dwm - dynamic window manager
2008-04-20 18:09:30 +00:00
# See LICENSE file for copyright and license details.
2006-07-10 14:38:18 +00:00
include config.mk
SRC = src/drw.c src/archy_dwm.c src/util.c
OBJ_DIR = build
OBJ = ${SRC:%.c=$(OBJ_DIR)/%.o}
BUILD_DIR = ${OBJ_DIR}/archy-dwm
2006-07-12 23:30:55 +00:00
all: options ${BUILD_DIR}
2006-07-10 14:38:18 +00:00
2006-07-17 16:49:13 +00:00
options:
@echo archy-dwm build options:
2006-07-10 14:49:43 +00:00
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
${OBJ_DIR}/%.o: %.c
mkdir -p $(@D)
${CC} -c ${CFLAGS} $< -o $@
2006-07-10 14:38:18 +00:00
${OBJ}: src/config.h config.mk
config.h:
cp config.def.h $@
${BUILD_DIR}: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
2006-07-10 14:38:18 +00:00
clean:
rm -rf ${OBJ_DIR}
2006-07-10 14:49:43 +00:00
dist: clean
mkdir -p archy-dwm_${VERSION}
cp -R LICENSE Makefile README config.def.h config.mk \
archy-dwm.1 drw.h util.h ${SRC} dwm.png transient.c archy-dwm_${VERSION}
tar -cf archy-dwm_${VERSION}.tar archy-dwm_${VERSION}
gzip archy-dwm_${VERSION}.tar
rm -rf archy-dwm_${VERSION}
2006-07-10 14:49:43 +00:00
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f ${BUILD_DIR} ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/archy-dwm
mkdir -p ${DESTDIR}${MANPREFIX}/man1
sed "s/VERSION/${VERSION}/g" < archy-dwm.1 > ${DESTDIR}${MANPREFIX}/man1/archy-dwm.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/archy-dwm.1
2006-07-10 14:49:43 +00:00
desktop:
full_path=/usr/share/xsessions/archy-dwm.desktop
2022-08-02 09:59:09 +00:00
mkdir -p /usr/share/xsessions
cat <<EOT >> ${full_path}
[Desktop Entry]
Type=XSession
Exec=/usr/local/bin/archy-dwm
DesktopNames=archy-dwm
Name=archy-dwm
Comment="A dynamic window manager for X"
2022-08-02 09:59:09 +00:00
2006-07-10 14:49:43 +00:00
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/archy-dwm \
${DESTDIR}${MANPREFIX}/man1/archy-dwm.1
.PHONY: all options clean dist install uninstall