openbsd-ports/x11/pwm/patches/patch-Makefile
naddy c7013b749b Update to 20010309 and general overhaul.
Submitted by Andrey Smagin <andrey@smagin.com>.
2002-02-20 12:47:55 +00:00

99 lines
3.3 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.2 2002/02/20 12:47:55 naddy Exp $
--- Makefile.orig Fri Mar 9 09:20:04 2001
+++ Makefile Mon Feb 18 21:54:35 2002
@@ -1,69 +1,34 @@
-##
-## PWM Makefile
-##
-
-# System-specific configuration is in system.mk
-include system.mk
-
-######################################
-
-SUBDIRS=libtu
-LIBS += -L./libtu -ltu -lm $(X11_LIBS) -lX11
-INCLUDES += -I./libtu/include $(X11_INCLUDES)
-DEFINES += -DETCDIR=\"$(ETCDIR)\"
-CFLAGS += $(XOPEN_SOURCE)
-TO_REALCLEAN += pwm.1x
-
OBJS= main.o draw.o font.o frame.o event.o clientwin.o thing.o \
property.o pointer.o key.o moveres.o cursor.o function.o \
exec.o focus.o workspace.o winobj.o screen.o menu.o \
readconfig.o menudata.o dock.o frameid.o placement.o \
binding.o winlist.o mwmhints.o signal.o winprops.o
-TARGETS=pwm
-
-######################################
-
-include rules.mk
-
-######################################
-
-pwm: $(OBJS) pwm.1x
- $(CC) $(OBJS) $(LDFLAGS) -o $@
-
-pwm.1x: pwm.1x.in
- sed 's#PREFIX#$(PREFIX)#g' pwm.1x.in > pwm.1x
-
-_install:
- $(INSTALLDIR) $(BINDIR)
- $(INSTALL) -m $(BIN_MODE) pwm $(BINDIR)
- $(STRIP) $(BINDIR)/pwm
-
- $(INSTALLDIR) $(MANDIR)/man1
- $(INSTALL) -m $(DATA_MODE) pwm.1x $(MANDIR)/man1
-
- $(INSTALLDIR) $(DOCDIR)
- $(INSTALLDIR) $(DOCDIR)/pwm
- $(INSTALL) -m $(DATA_MODE) config.txt $(DOCDIR)/pwm
- $(INSTALL) -m $(DATA_MODE) LICENSE $(DOCDIR)/pwm
-
- $(INSTALLDIR) $(ETCDIR)
- $(INSTALLDIR) $(ETCDIR)/pwm
- for i in etc/pwm/*.conf; do \
- $(INSTALL) -m $(DATA_MODE) $$i $(ETCDIR)/pwm; \
- done
- @ if test -f $(ETCDIR)/pwm/pwm.conf ; then \
- echo "$(ETCDIR)/pwm/pwm.conf already exists. Not installing one."; \
- else \
- echo "Installing sample configuration file $(ETCDIR)/pwm/pwm.conf"; \
- $(INSTALL) -m $(DATA_MODE) etc/pwm/sample.conf $(ETCDIR)/pwm/pwm.conf; \
- fi
-
+CFLAGS += -DPREFIX=\"${PREFIX}\" -DETCDIR=\"${SYSCONFDIR}\" -Ilibtu/include -I${X11BASE}/include
-# Disclaimer: I don't have either Gnome or KDE.
+LDFLAGS += ${WARN} -Llibtu -ltu -lm -lX11 -L${X11BASE}/lib
-install-gnomede: support/PWM.desktop
- $(INSTALL) -m $(DATA_MODE) support/PWM.desktop \
- `gnome-config --datadir`/gnome/wm-properties
+all: main
-install-gnome: install install-gnomede
+main: ${OBJS}
+ ${CC} ${OBJS} ${LDFLAGS} -o pwm
+ sed -e 's#/usr/local/etc#${SYSCONFDIR}#g' -e 's#PREFIX#${PREFIX}/share#g' pwm.1x.in > pwm.1x
+
+$(OBJS): libtu
+
+libtu::
+ (cd ${.CURDIR}/libtu && ${MAKE})
+
+install:
+ ${BSD_INSTALL_PROGRAM} pwm ${PREFIX}/bin
+ ${BSD_INSTALL_MAN} pwm.1x ${PREFIX}/man/man1/pwm.1
+ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/doc/pwm
+ ${BSD_INSTALL_DATA} LICENSE ${PREFIX}/share/doc/pwm
+ ${BSD_INSTALL_DATA} config.txt ${PREFIX}/share/doc/pwm
+ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/examples/pwm
+ ${BSD_INSTALL_DATA} etc/pwm/buttons-default.conf ${PREFIX}/share/examples/pwm/buttons-default.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/look-beoslike.conf ${PREFIX}/share/examples/pwm/look-beoslike.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/menus-default.conf ${PREFIX}/share/examples/pwm/menus-default.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/keys-default.conf ${PREFIX}/share/examples/pwm/keys-default.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/look-brownsteel.conf ${PREFIX}/share/examples/pwm/look-brownsteel.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/sample.conf ${PREFIX}/share/examples/pwm/pwm.conf-sample