4 exec_prefix=@exec_prefix@
6 sysconfdir=@sysconfdir@
10 includedir=${prefix}/include
12 libdir=${exec_prefix}/lib
13 bindir=${exec_prefix}/bin
16 top_srcdir=@top_srcdir@
24 ALL_CFLAGS=${CFLAGS} -I${top_srcdir}/h -I${BUILDTOP}/h @X_CFLAGS@ ${CPPFLAGS}
25 LDFLAGS=-L${BUILDTOP}/lib @LDFLAGS@
26 LIBS=-lzephyr -lss -lreadline -lhistory -lcurses @LIBS@ -lcom_err
28 OBJS= zctl.o zctl_cmds.o
32 zctl: ${OBJS} ${BUILDTOP}/lib/libzephyr.a
33 ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBS}
35 zctl_cmds.c: zctl_cmds.ct
36 mk_cmds ${srcdir}/zctl_cmds.ct
39 ${CC} -c ${ALL_CFLAGS} $<
44 ${INSTALL} -m 755 -s zctl ${DESTDIR}${bindir}
45 ${INSTALL} -m 644 ${srcdir}/zctl.1 ${DESTDIR}${mandir}/man1
48 rm -f ${OBJS} zctl_cmds.c zctl
50 ${OBJS}: ${top_srcdir}/h/sysdep.h ${BUILDTOP}/h/config.h
51 ${OBJS}: ${BUILDTOP}/h/zephyr/zephyr.h ${BUILDTOP}/h/zephyr/zephyr_err.h
53 .PHONY: all check install clean