5 DEFINES = -DVERSION=\"$(VERSION)\"
6 CFLAGS += -Wall -pedantic -Wshadow -Wmissing-prototypes -Wcast-align
7 CFLAGS += -Wcast-qual -Wchar-subscripts -Wpointer-arith
8 CFLAGS += -Wredundant-decls -Wstrict-prototypes
10 XPMLIB = -L$(PREFIX)/lib/X11 -lXpm
13 LOCAL_LIBRARIES = $(XPMLIB) $(XLIB)
15 LINTLIBS = $(LINTXLIB)
17 SHAREDIR = $(PREFIX)/share/$(NAME)
24 SPEC_SRC = $(NAME).spec.in
25 SPEC_OBJ = $(NAME).spec
26 SPECS = $(SPEC_SRC) $(SPEC_OBJ)
37 MANSRC = wmclock.man.in
40 SYMLINKS = month.xpm weekday.xpm
43 SRCS = dynlist.c wmclock.c
44 OBJS = dynlist.o wmclock.o
46 TARDIR = $(NAME)-$(VERSION)
47 TARBALL = $(TARDIR).tar.gz
49 ComplexProgramTarget($(NAME))
52 cat $(MANSRC) |sed \@@\
53 -e 's/@VERSION@/$(VERSION)/g' \@@\
54 -e 's/@DATE@/$(DATE)/g' \@@\
61 $(SPEC_OBJ): $(SPEC_SRC) $(IMAKEFILE)
62 cat $(SPEC_SRC) |sed -e 's/@VERSION@/$(VERSION)/g' >$@
65 @if [ -d $(DESTDIR)$(SHAREDIR) ]; then set +x; \@@\
66 else (set -x; $(MKDIRHIER) $(DESTDIR)$(SHAREDIR)); fi
68 for i in lang.*; do \@@\
69 $(MKDIRHIER) $(DESTDIR)$(SHAREDIR)/$${i}; \@@\
70 $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) ./$${i}//**/* \@@\
71 $(DESTDIR)$(SHAREDIR)/$${i}/; \@@\
76 $(TARBALL): $(EXTRA_FILES) $(EXTRA_DIRS) $(MANSRC) $(HDRS) $(SRCS)
78 $(MKDIRHIER) $(TARDIR)
79 $(CP) -p $(EXTRA_FILES) $(MANSRC) $(HDRS) $(SRCS) $(TARDIR)/
80 -for i in $(EXTRA_DIRS); do \@@\
81 $(MKDIRHIER) $(TARDIR)/$${i}; \@@\
82 $(CP) -p $${i}//**/* $(TARDIR)/$${i}/; \@@\
84 chmod -Rc ug+rwX,o+rX,o-w $(TARDIR)
85 tar -cvf - $(TARDIR) |gzip -9 >$(TARBALL)