File: Makefile

package info (click to toggle)
alevt 1:1.6.2-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 956 kB
  • ctags: 662
  • sloc: ansic: 6,284; makefile: 119; perl: 104; sh: 15
file content (134 lines) | stat: -rw-r--r-- 4,646 bytes parent folder | download | duplicates (3)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
VER=1.6.2
OPT=-O2 -s -w
#OPT=-O -g
DEFS=-DWITH_PNG
FONT=vtxt
USR_X11R6=/usr/X11R6
#USR_X11R6=/usr
MAN_DIR=man
#MAN_DIR=share/man
HOSTCC=$(CC)
# a smaller and thinner font
#FONT=neep9

CFLAGS=$(OPT) -DVERSION=\"$(VER)\" $(DEFS) -I$(USR_X11R6)/include

EXPOBJS=export.o exp-txt.o exp-html.o exp-gfx.o font.o
OBJS=main.o ui.o xio.o fdset.o vbi.o cache.o help.o edline.o search.o edit.o misc.o hamm.o lang.o $(EXPOBJS)
TOBJS=alevt-date.o vbi.o fdset.o misc.o hamm.o lang.o
COBJS=alevt-cap.o vbi.o fdset.o misc.o hamm.o lang.o $(EXPOBJS)

ifneq ($(findstring WITH_PNG,$(DEFS)),)
EXPLIBS=-lpng -lz -lm
endif

all: alevt alevt-date alevt-cap alevt.1x alevt-date.1 alevt-cap.1

alevt: $(OBJS)
	$(CC) $(OPT) $(OBJS) -o alevt -L$(USR_X11R6)/lib -L$(USR_X11R6)/lib64 -lX11 $(EXPLIBS)

alevt-date: $(TOBJS)
	$(CC) $(OPT) $(TOBJS) -o alevt-date

alevt-cap: $(COBJS)
	$(CC) $(OPT) $(COBJS) -o alevt-cap $(EXPLIBS)

font.o: font1.xbm font2.xbm
fontsize.h: font1.xbm font2.xbm
	fgrep -h "#define" font1.xbm font2.xbm >fontsize.h

font1.xbm: bdf2xbm $(FONT)-latin-1.bdf
	./bdf2xbm font1 <$(FONT)-latin-1.bdf >font1.xbm

font2.xbm: bdf2xbm $(FONT)-latin-2.bdf
	./bdf2xbm font2 <$(FONT)-latin-2.bdf >font2.xbm

bdf2xbm: bdf2xbm.c
	$(HOSTCC) bdf2xbm.c -o bdf2xbm

alevt.1x: alevt.1x.in
	sed s/VERSION/$(VER)/g <alevt.1x.in >alevt.1x

alevt-date.1: alevt-date.1.in
	sed s/VERSION/$(VER)/g <alevt-date.1.in >alevt-date.1

alevt-cap.1: alevt-cap.1.in
	sed s/VERSION/$(VER)/g <alevt-cap.1.in >alevt-cap.1

clean:
	rm -f *.o page*.txt a.out core bdf2xbm font?.xbm fontsize.h Makefile.bak
	rm -f alevt alevt-date alevt-cap
	rm -f alevt.1x alevt-date.1 alevt-cap.1
	rm -f contrib/a.out ttext-*.*
	rm -f alevt.html

rpm-install: all
	install -m 0755 alevt        ${RPM_BUILD_ROOT}$(USR_X11R6)/bin
	install -m 0755 alevt-date   ${RPM_BUILD_ROOT}$(USR_X11R6)/bin
	install -m 0755 alevt-cap    ${RPM_BUILD_ROOT}$(USR_X11R6)/bin
	install -m 0644 alevt.1x     ${RPM_BUILD_ROOT}$(USR_X11R6)/$(MAN)/man1
	install -m 0644 alevt-date.1 ${RPM_BUILD_ROOT}$(USR_X11R6)/$(MAN)/man1
	install -m 0644 alevt-cap.1  ${RPM_BUILD_ROOT}$(USR_X11R6)/$(MAN)/man1
	install -d 0755 $(RPM_BUILD_ROOT)$(USR_X11R6)/include/X11/pixmaps
	install -m 0644 contrib/mini-alevt.xpm $(RPM_BUILD_ROOT)$(USR_X11R6)/include/X11/pixmaps

# anything below this line is just for me!

install: all
	install -m 0755 alevt		/usr/local/bin
	install -m 0755 alevt-date	/usr/local/bin
	install -m 0755 alevt-cap	/usr/local/bin
	install -m 0644 alevt.1x	/usr/local/man/man1
	install -m 0644 alevt-date.1	/usr/local/man/man1
	install -m 0644 alevt-cap.1	/usr/local/man/man1
	install -m 0644 contrib/mini-alevt.xpm /usr/include/X11/pixmaps

depend:
	makedepend -Y -- $(CFLAGS_none) -- *.c 2>/dev/null

tar-html: alevt.1x alevt-date.1 alevt-cap.1
	for i in alevt.1x alevt-date.1 alevt-cap.1 ; do \
	    j=`basename $$i .1` ; \
	    j=`basename $$j .1x` ; \
	    nroff -man $$i | { \
		echo "<HTML><HEAD><TITLE>AleVT</TITLE></HEAD><BODY>" ; \
		man2html -bare -uelem U -nodepage ; \
		echo "</B0DY></HTML>" ; \
	    } | sed -e "s,</B> <B>, ,g" -e "s,</U> <U>, ,g" >~/exit/alevt/$$j.html ;\
	done

tar: tar-html clean
	sed s/VERSION/$(VER)/g <alevt.lsm.in >~/exit/alevt/alevt-$(VER).lsm
	sed s/VERSION/$(VER)/g <alevt.spec.in >alevt.spec
	cd .. ;\
	    ln -s alevt alevt-$(VER) ;\
	    tar vcfz ~/exit/alevt/alevt-$(VER).tar.gz alevt-$(VER)/* ;\
	    rm alevt-$(VER)
	cat <CHANGELOG >~/exit/alevt/changes

# DO NOT DELETE

alevt-cap.o: vt.h misc.h fdset.h dllist.h vbi.h cache.h lang.h export.h
alevt-date.o: os.h vt.h misc.h fdset.h dllist.h vbi.h cache.h lang.h
cache.o: misc.h dllist.h cache.h vt.h help.h
edit.o: vt.h misc.h xio.h dllist.h vbi.h cache.h lang.h edit.h edline.h
edline.o: vt.h misc.h xio.h dllist.h edline.h
exp-gfx.o: lang.h misc.h vt.h export.h font.h fontsize.h
exp-html.o: lang.h misc.h vt.h export.h
exp-txt.o: os.h export.h vt.h misc.h
export.o: vt.h misc.h export.h
fdset.o: dllist.h misc.h fdset.h
font.o: font1.xbm font2.xbm
hamm.o: vt.h misc.h hamm.h
help.o: vt.h misc.h vt900.out vt901-02.out vt901-01.out vt902.out vt903.out
help.o: vt910.out vt911-02.out vt911-01.out vt912-02.out vt912-01.out
help.o: vt913.out vt914-02.out vt914-01.out vt915.out vt999.out
lang.o: misc.h vt.h lang.h
main.o: vt.h misc.h fdset.h dllist.h xio.h vbi.h cache.h lang.h ui.h edline.h
main.o: search.h
misc.o: misc.h
search.o: vt.h misc.h cache.h dllist.h search.h
ui.o: vt.h misc.h xio.h dllist.h vbi.h cache.h lang.h fdset.h edit.h edline.h
ui.o: search.h export.h ui.h
vbi.o: os.h vt.h misc.h vbi.h dllist.h cache.h lang.h fdset.h hamm.h
xio.o: vt.h misc.h dllist.h xio.h fdset.h lang.h icon.xbm font.h fontsize.h