File: Makefile

package info (click to toggle)
eukleides 0.9.2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 452 kB
  • ctags: 270
  • sloc: ansic: 1,934; yacc: 796; lex: 499; makefile: 101; sh: 61
file content (67 lines) | stat: -rw-r--r-- 1,679 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
# Eukleides 0.9.2 makefile
# Copyright (c) Christian Obrecht 2000-2002
# Modified for Debian by Streph Treadway 2003

CC = gcc
# CFLAGS = -W -Wall -c   debian/rules handles this
OBJECTS = lex.yy.o parser.tab.o main.o geometry.o drawing.o
LEX = flex
YACC = bison -d
BIN = $(DESTDIR)/usr/bin/
MAN = $(DESTDIR)/usr/share/man/man1/
INFO = $(DESTDIR)/usr/share/info/
PAPER = --texinfo=@afourpaper
DOC = eukleides.info eukleides.dvi eukleides.ps

eukleides : $(OBJECTS)
	$(CC) -o $@ -lm $(OBJECTS)

.c.o :
	$(CC) $(CFLAGS) $<

lex.yy.c : lexer.l parser.tab.c
	$(LEX) $<

parser.tab.c : parser.y
	$(YACC) $<

man : eukleides.man
	cp -f $< $(MAN)eukleides.1 ; \
	ln -fs ./eukleides.1 $(MAN)euk2eps.1 ; \
	ln -fs ./eukleides.1 $(MAN)euk2edit.1

info : eukleides.texi
	makeinfo $<

dvi : eukleides.texi
	cp $< tmp.texi ; \
	texi2dvi $(PAPER) tmp.texi ; \
	mv tmp.dvi eukleides.dvi ; \
	rm -f tmp.*

book : dvi
	dvips -f eukleides.dvi > eukleides.ps

install : eukleides man info
#	strip eukleides ; \  Let dh_strip do this DEB_BUILD_OPTIONS support
	cp -f eukleides $(BIN)eukleides ; \
	chmod +x euk2eps ; \
	cp -f euk2eps $(BIN)euk2eps ; \
	chmod +x euk2edit ; \
	cp -f euk2edit $(BIN)euk2edit ; \
#	Leave install and removal of info files to dh_installinfo
#	install-info --quiet --infodir=$(INFO) eukleides.info ; \
#	cp -f eukleides.info $(INFO)eukleides.info

uninstall :
	rm -f $(BIN)eukleides ; \
	rm -f $(BIN)euk2edit ; \
	rm -f $(BIN)euk2eps ; \
	rm -f $(MAN)eukleides.1 ; \
	rm -f $(MAN)euk2eps.1 ; \
	rm -f $(MAN)euk2edit.1 ; \
#	install-info --infodir=$(INFO) --remove eukleides.info ; \
#	rm -f $(INFO)eukleides.info

clean :
	rm -f lex.yy.c parser.tab.* *.o eukleides $(DOC)