File: Makefile.am

package info (click to toggle)
xwrits 2.19-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 564 kB
  • ctags: 641
  • sloc: ansic: 5,242; sh: 330; makefile: 93
file content (74 lines) | stat: -rw-r--r-- 2,663 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = no-dependencies foreign check-news

bin_PROGRAMS = xwrits
noinst_PROGRAMS = giftoc
man_MANS = xwrits.1

INCLUDES = $(X_CFLAGS)

LDADD = @LIBOBJS@
xwrits_LDADD = $(LDADD) @X_LIBS@ @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@ -lm

xwrits_SOURCES = fmalloc.c \
		gif.h giffunc.c gifread.c gifx.h gifx.c \
		xwrits.h clock.c hands.c lock.c main.c pictures.c rest.c \
		schedule.c warning.c

giftoc_SOURCES = giftoc.c

BUILT_SOURCES = colorpic.c monopic.c

xwrits_DEPENDENCIES = @LIBOBJS@
giftoc_DEPENDENCIES = @LIBOBJS@

giffunc.o gifread.o giftoc.o gifx.o: gif.h config.h
pictures.o: pictures.c colorpic.c monopic.c
clock.o lock.o main.o pictures.o rest.o schedule.o warning.o: xwrits.h config.h

COLOR_PIC = color/bars.gif color/lock.gif \
	color/clenchl.gif color/spreadl.gif color/fingerl.gif color/restl.gif \
	color/okl.gif color/clenchi.gif color/spreadi.gif color/fingeri.gif \
	color/resti.gif color/oki.gif color/koreanl.gif color/koreani.gif \
	color/germanl.gif color/germani.gif
MONO_PIC = mono/barsm.gif mono/lockm.gif \
	mono/clenchlm.gif mono/spreadlm.gif mono/fingerlm.gif mono/restlm.gif \
	mono/oklm.gif mono/clenchim.gif mono/spreadim.gif mono/fingerim.gif \
	mono/restim.gif mono/okim.gif

colorpic.c: $(COLOR_PIC) giftoc
	./giftoc -makename -dir $(srcdir) $(COLOR_PIC) > $@
monopic.c: $(MONO_PIC) giftoc
	./giftoc -makename -dir $(srcdir) $(MONO_PIC) > $@

EXTRA_DIST = GESTURES xwrits.1 logo.gif rpm.spec
MOSTLYCLEANFILES = colorpic.c monopic.c

dist-hook:
	@mkdir $(distdir)/color $(distdir)/mono
	@d=`cd $(distdir)/color; pwd` && cd $(srcdir) && cp -p $(COLOR_PIC) $$d
	@d=`cd $(distdir)/mono; pwd` && cd $(srcdir) && cp -p $(MONO_PIC) $$d

srclinks:
	for i in fmalloc.c strerror.c ; do \
	ln -sf ~/src/edlib/$$i $$i ; done
	for i in gif.h giffunc.c gifread.c giftoc.c gifx.h gifx.c ; do \
	ln -sf ~/src/giflib/$$i $$i ; done

versionize:
	perl -pi -e "s/^\\.ds V.*/.ds V $(VERSION)/;" xwrits.1
	perl -pi -e "s/^Version: .*/Version: $(VERSION)/; s/$(PACKAGE)-[\w.]+\.tar\.gz/$(PACKAGE)-$(VERSION).tar.gz/;" rpm.spec

rpm: dist
	buildarch=`rpm --showrc | awk '/^build arch/ { print $$4; }'` ; \
	mkdir -p /tmp/rpm-xw/SOURCES /tmp/rpm-xw/RPMS/$$buildarch \
	/tmp/rpm-xw/BUILD ; \
	echo 'include: /usr/lib/rpm/rpmrc' > /tmp/rpm-xw/rc ; \
	echo 'macrofiles: /usr/lib/rpm/macros:/tmp/rpm-xw/macros' >> /tmp/rpm-xw/rc ; \
	echo '%_topdir /tmp/rpm-xw' > /tmp/rpm-xw/macros ; \
	cp logo.gif $(PACKAGE)-$(VERSION).tar.gz /tmp/rpm-xw/SOURCES ; \
	rpm --rcfile /tmp/rpm-xw/rc -bb rpm.spec ; \
	cp /tmp/rpm-xw/RPMS/$$buildarch/*.rpm .
	rm -rf /tmp/rpm-xw

.PHONY: srclinks versionize rpm