2003-06-05 19:01:51 -04:00
|
|
|
$OpenBSD: patch-Makefile,v 1.3 2003/06/05 23:01:51 naddy Exp $
|
|
|
|
--- Makefile.orig Wed May 28 14:58:16 2003
|
|
|
|
+++ Makefile Tue Jun 3 21:49:21 2003
|
|
|
|
@@ -1,69 +1,33 @@
|
2002-02-20 07:47:55 -05:00
|
|
|
-##
|
|
|
|
-## PWM Makefile
|
|
|
|
-##
|
|
|
|
-
|
|
|
|
-# System-specific configuration is in system.mk
|
2003-06-05 19:01:51 -04:00
|
|
|
-include system-inc.mk
|
2002-02-20 07:47:55 -05:00
|
|
|
-
|
|
|
|
-######################################
|
|
|
|
-
|
|
|
|
-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
|
2001-03-19 10:48:38 -05:00
|
|
|
|
2002-02-20 07:47:55 -05:00
|
|
|
-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; \
|
|
|
|
+CFLAGS += -DPREFIX=\"${PREFIX}\" -DETCDIR=\"${SYSCONFDIR}\" -Ilibtu/include -I${X11BASE}/include
|
2003-06-05 19:01:51 -04:00
|
|
|
+
|
2002-02-20 07:47:55 -05:00
|
|
|
+LDFLAGS += ${WARN} -Llibtu -ltu -lm -lX11 -L${X11BASE}/lib
|
2003-06-05 19:01:51 -04:00
|
|
|
+
|
2002-02-20 07:47:55 -05:00
|
|
|
+all: main
|
2003-06-05 19:01:51 -04:00
|
|
|
+
|
2002-02-20 07:47:55 -05:00
|
|
|
+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
|
2003-06-05 19:01:51 -04:00
|
|
|
+ for i in buttons-default.conf look-beoslike.conf menus-default.conf \
|
|
|
|
+ keys-default.conf look-brownsteel.conf ; do \
|
|
|
|
+ ${BSD_INSTALL_DATA} etc/pwm/$$i ${PREFIX}/share/examples/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
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-# Disclaimer: I don't have either Gnome or KDE.
|
|
|
|
-
|
|
|
|
-install-gnomede: support/PWM.desktop
|
|
|
|
- $(INSTALL) -m $(DATA_MODE) support/PWM.desktop \
|
|
|
|
- `gnome-config --datadir`/gnome/wm-properties
|
|
|
|
-
|
|
|
|
-install-gnome: install install-gnomede
|
|
|
|
+ ${BSD_INSTALL_DATA} etc/pwm/sample.conf ${PREFIX}/share/examples/pwm/pwm.conf
|