summaryrefslogtreecommitdiffstats
path: root/src/makefile
blob: 7960b987f93df518f212887dd014240026429266 (plain)
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
# simplified version for general use, so as not to look so intimidating
WARNS = -Wall -W
# Even this level flags a known problem with flex-2.6.1 output, regarding
# signed/unsigned comparison in YY_INPUT.

# Developers or anal compulsives: uncomment the following WARNS definition.
# Leave off -Wtraditional-conversion until flex and bison get cleaned up.
# Use -W for now instead of the more modern -Wextra, since lots of people
# still use older compilers.
# WARNS = -Wall -W -Wshadow -Wundef -Wredundant-decls -Wpointer-arith -Wcast-qual -Wpointer-arith -Wcast-align -Wcast-qual -Wsign-compare -Wwrite-strings -Wformat=2 -pedantic
# Code generated by yacc-3.0.2 fails -Wstrict-overflow=5

# any of the following three should work:
# STANDARD =
# STANDARD = --std=c89 -D_DEFAULT_SOURCE
STANDARD = --std=c99 -D_DEFAULT_SOURCE
# some older versions of libc might need -D_POSIX_C_SOURCE -D_BSD_SOURCE
# instead of -D_DEFAULT_SOURCE

vhd2vl : lex.yy.c vhd2vl.tab.c
	$(CC) ${STANDARD} ${WARNS} -O2 -g -o vhd2vl lex.yy.c vhd2vl.tab.c

vhd2vl.tab.c : vhd2vl.y def.h
	bison -d -v -t vhd2vl.y

lex.yy.c : vhd2vl.l def.h
	flex -i vhd2vl.l

clean :
	rm -f lex.yy.c vhd2vl.tab.c vhd2vl.tab.h vhd2vl.output  vhd2vl
OpenPOWER on IntegriCloud