25 # Copyright (c) 2018, Joyent, Inc.
26
27 PROG= zonecfg
28 OBJS= zonecfg.o zonecfg_lex.o zonecfg_grammar.tab.o
29
30 include ../Makefile.cmd
31
32 # zonecfg has a name clash with main() and libl.so.1. However, zonecfg must
33 # still export a number of "yy*" (libl) interfaces. Reduce all other symbols
34 # to local scope.
35 MAPFILES += $(MAPFILE.LEX) $(MAPFILE.NGB)
36 MAPOPTS = $(MAPFILES:%=-M%)
37
38 LFLAGS = -t
39 YFLAGS = -d -b zonecfg_grammar
40 LDLIBS += -lzonecfg -ll -lnsl -ltecla -lzfs -lbrand -ldladm -linetutil
41 CPPFLAGS += -I.
42 LDFLAGS += $(MAPOPTS)
43 CLEANFILES += zonecfg_lex.c zonecfg_grammar.tab.c zonecfg_grammar.tab.h
44
45 CERRWARN += -_gcc=-Wno-uninitialized
46 CERRWARN += -_gcc=-Wno-unused-label
47 CERRWARN += -_gcc=-Wno-unused-variable
48 CERRWARN += -_gcc=-Wno-implicit-function-declaration
49
50 SMOFF += all_func_returns
51
52 CLOBBERFILES += $(PROG).ln
53
54 .KEEP_STATE:
55
56 all: $(PROG)
57
58 $(PROG): $(OBJS) $(MAPFILES)
59 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
60 $(POST_PROCESS)
61
62 install: all $(ROOTUSRSBINPROG)
63
64 zonecfg_lex.c: zonecfg_lex.l zonecfg_grammar.tab.h zonecfg.h
65 $(LEX) $(LFLAGS) zonecfg_lex.l > $@
|
25 # Copyright (c) 2018, Joyent, Inc.
26
27 PROG= zonecfg
28 OBJS= zonecfg.o zonecfg_lex.o zonecfg_grammar.tab.o
29
30 include ../Makefile.cmd
31
32 # zonecfg has a name clash with main() and libl.so.1. However, zonecfg must
33 # still export a number of "yy*" (libl) interfaces. Reduce all other symbols
34 # to local scope.
35 MAPFILES += $(MAPFILE.LEX) $(MAPFILE.NGB)
36 MAPOPTS = $(MAPFILES:%=-M%)
37
38 LFLAGS = -t
39 YFLAGS = -d -b zonecfg_grammar
40 LDLIBS += -lzonecfg -ll -lnsl -ltecla -lzfs -lbrand -ldladm -linetutil
41 CPPFLAGS += -I.
42 LDFLAGS += $(MAPOPTS)
43 CLEANFILES += zonecfg_lex.c zonecfg_grammar.tab.c zonecfg_grammar.tab.h
44
45 CERRWARN += $(CNOWARN_UNINIT)
46 CERRWARN += -_gcc=-Wno-unused-label
47 CERRWARN += -_gcc=-Wno-unused-variable
48 CERRWARN += -_gcc=-Wno-implicit-function-declaration
49
50 SMOFF += all_func_returns
51
52 CLOBBERFILES += $(PROG).ln
53
54 .KEEP_STATE:
55
56 all: $(PROG)
57
58 $(PROG): $(OBJS) $(MAPFILES)
59 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
60 $(POST_PROCESS)
61
62 install: all $(ROOTUSRSBINPROG)
63
64 zonecfg_lex.c: zonecfg_lex.l zonecfg_grammar.tab.h zonecfg.h
65 $(LEX) $(LFLAGS) zonecfg_lex.l > $@
|