3 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4 # Use is subject to license terms.
8 ROUTEDOBJS
= common.o if.o input.o main.o output.o parms.o radix.o \
9 rdisc.o table.o trace.o
10 ROUTEDSRCS
= $(ROUTEDOBJS
:.o
=.c
)
12 RTQUERYOBJS
= common.o rtquery.o
13 RTQUERYSRCS
= $(RTQUERYOBJS
:.o
=.c
)
14 POFILEOBJS
= $(ROUTEDOBJS
) $(RTQUERYOBJS
)
16 PROG
= $(ROUTEDPROG
) $(RTQUERYPROG
)
17 SRCS
= $(ROUTEDSRCS
) $(RTQUERYSRCS
)
21 include ..
/..
/..
/Makefile.cmd
23 ROOTMANIFESTDIR
= $(ROOTSVCNETWORKROUTING
)
26 # in.routed uses ancillary data features available through
27 # the Open Group's Networking Services standard. The following
28 # pre-processor definitions enable these features.
30 _D_XOPEN_EXTN
= -D_XOPEN_SOURCE
=500 -D__EXTENSIONS__
32 CPPFLAGS
+= $(_D_XOPEN_EXTN
)
33 CERRWARN
+= -Wno-parentheses
34 CERRWARN
+= -Wno-uninitialized
36 CLEAN_FILES
+= $(ROUTEDOBJS
) $(RTQUERYOBJS
)
37 CLOBBERFILES
+= $(ROUTEDPROG
) $(RTQUERYPROG
)
42 POFILES
= $(POFILEOBJS
:.o
=.po
)
44 $(ROUTEDPROG
):= LDLIBS
+= -lkstat
46 # This needs to be done because of SPARC/x86 differences. On x86,
47 # double has required alignment of only 4 bytes, but on SPARC it's 8
48 # bytes. This means that sockaddr_in can be casted to
49 # sockaddr_storage without complaint on x86, but requires a
50 # suppression directive on SPARC.
52 CTFCONVERT_HOOK
= && $(CTFCONVERT_O
)
53 CTFMERGE_HOOK
= && $(CTFMERGE
) -L VERSION
-o
$@
$(ROUTEDOBJS
)
54 $(ROUTEDOBJS
) := CFLAGS
+= $(CTF_FLAGS
)
55 $(RTQUERYOBJS
) := CFLAGS
+= $(CTF_FLAGS
)
59 .PARALLEL
: $(ROUTEDPROG
) $(RTQUERYOBJS
)
67 $(ROUTEDPROG
): $(ROUTEDOBJS
)
68 $(LINK.c
) -o
$@
$(ROUTEDOBJS
) $(LDLIBS
) $(CTFMERGE_HOOK
)
71 $(RTQUERYPROG
): $(RTQUERYOBJS
)
72 $(LINK.c
) -o
$@
$(RTQUERYOBJS
) $(LDLIBS
) -lresolv
$(CTFMERGE_HOOK
)
75 install: all $(ROOTUSRSBINPROG
) $(ROOTMANIFEST
)
82 include ..
/..
/..
/Makefile.targ