blob: d053e34ee643a8bd04195bb64ff4064e73f8fbe8 (
plain) (
tree)
|
|
PREFIX?= /usr/local
BINDIR?= $(PREFIX)/bin
ETCDIR?= $(PREFIX)/etc
MANDIR?= $(PREFIX)/man/man
NO_MANCOMPRESS?= yes
MAN1= vtwm.1
SOUND?= yes
LN= ln -f
LFLAGS+= -l
# For the traditional look of TWM as the system fallback,
# change this to "2D"
SYS_VTWMRC_LOOK = 3D
CONFDEFINES= '-DSYSTEM_VTWMRC="'$(ETCDIR)'/system.vtwmrc"' \
'-DSYSTEM_TWMRC="'$(ETCDIR)'/system.twmrc"'
CFLAGS+= -I/usr/local/include $(CONFDEFINES)
LDADD+= -L/usr/local/lib -ll -lXpm -lXmu
.if ${SOUND} == "yes"
LDADD+= -lrplay
.else
CFLAGS+= -DNO_SOUND_SUPPORT
.endif
PROG= vtwm
SRCS= gram.y gram.h lex.l deftwmrc.c add_window.c gc.c list.c twm.c sound.c \
parse.c menus.c events.c resize.c util.c version.c iconmgr.c \
cursor.c regions.c applets.c icons.c desktop.c doors.c lastmake.c
FILES= system.vtwmrc
FILESDIR= $(ETCDIR)
FILESMODE= 644
deftwmrc.c: vtwm.man system.vtwmrc
echo '/* ' >$@
echo ' * This file is generated automatically from the default' >>$@
echo ' * VTWM bindings file system.vtwmrc.'$(SYS_VTWMRC_LOOK)' by the VTWM Makefile.' >>$@
echo ' */' >>$@
echo '' >>$@
echo 'char *defTwmrc[] = {' >>deftwmrc.c
sed -e '/^$$/d' -e '/^#/d' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/",/' -e 's/[ ]\{1,\}/ /g' -e 's/^" /"/' system.vtwmrc >>$@
echo '(char *)0 };' >>$@
lastmake.c:
echo '/* ' >$@
echo ' * This file is generated automatically by the VTWM Makefile.' >>$@
echo ' */' >>$@
echo '' >>$@
echo 'char *lastmake[] = {' >>lastmake.c
echo ' "Platform: '`uname -r -s`'",' >>$@
echo ' "Build: '`date`'",' >>$@
echo ' "" };' >>$@
vtwm.man:
$(LN) doc/$@ vtwm.1
system.vtwmrc:
$(LN) $@.$(SYS_VTWMRC_LOOK) $@
.include <bsd.prog.mk>
|