File: Makefile

package info (click to toggle)
modutils 2.1.85-11
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,020 kB
  • ctags: 1,024
  • sloc: ansic: 9,324; sh: 2,180; lex: 484; yacc: 362; makefile: 309
file content (44 lines) | stat: -rw-r--r-- 1,120 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
# $Id: Makefile,v 1.3 1998/01/07 08:43:42 rth Exp $

include ../Makeconfig

#----------------------------------------------------------------------

all: genksyms

genksyms: genksyms.o parse.o lex.o ../util/libutil.a
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^

parse.c: parse.y
	@echo "expect 6 shift/reduce conflicts and 5 reduce/reduce conflicts."
	bison -o $@ -dtv $^

lex.c: lex.l
	flex -o$@ -d $^

crc32.tab: makecrc32.c
	$(CC) $(CFLAGS) -o makecrc32 makecrc32.c
	./makecrc32 > $@.tmp
	mv $@.tmp $@

keywords.c: keywords.gperf
	gperf -a -C -E -g -H is_reserved_hash -k 1,3,$$ -N is_reserved_word -p -t $^ > $@.tmp
	mv $@.tmp $@

clean:
	rm -f *.o *.tmp parse.output genksyms makecrc32

realclean: clean
	rm -f parse.c parse.h lex.c crc32.tab keywords.c

install install-bin: all
	$(INSTALL) genksyms $(sbindir)

# auto-generated dependancies are almost redundant once we add all the 
# rules to get the generated files built first.
dep depend:

genksyms.o: genksyms.c crc32.tab genksyms.h \
  ../include/util.h ../include/version.h
lex.o: lex.c keywords.c genksyms.h parse.c ../include/util.h
parse.o: parse.c genksyms.h