The -DNAME=switch flag is an artifact from the PoC when I couldn't
authorreyk <reyk@openbsd.org>
Tue, 19 Jul 2016 18:14:08 +0000 (18:14 +0000)
committerreyk <reyk@openbsd.org>
Tue, 19 Jul 2016 18:14:08 +0000 (18:14 +0000)
decide on a name.  Remove it and fix the name to switchd now.

usr.sbin/switchctl/Makefile
usr.sbin/switchd/Makefile
usr.sbin/switchd/types.h

index e894ddd..892c4c1 100644 (file)
@@ -1,18 +1,15 @@
-# $OpenBSD: Makefile,v 1.1 2016/07/19 16:54:26 reyk Exp $
+# $OpenBSD: Makefile,v 1.2 2016/07/19 18:14:08 reyk Exp $
 
-NAME=          switch
+.PATH:         ${.CURDIR}/../switchd
 
-.PATH:         ${.CURDIR}/../${NAME}d
-
-PROG=          ${NAME}ctl
-MAN=           ${NAME}ctl.8
-SRCS=          log.c ${NAME}ctl.c parser.c util.c
+PROG=          switchctl
+MAN=           switchctl.8
+SRCS=          log.c switchctl.c parser.c util.c
 
 LDADD=         -lutil
 DPADD=         ${LIBUTIL}
 
-CFLAGS+=       -DOFD_NAME=\"${NAME}\"
-CFLAGS+=       -Wall -I${.CURDIR} -I${.CURDIR}/../${NAME}d
+CFLAGS+=       -Wall -I${.CURDIR} -I${.CURDIR}/../switchd
 CFLAGS+=       -Wstrict-prototypes -Wmissing-prototypes
 CFLAGS+=       -Wmissing-declarations
 CFLAGS+=       -Wshadow -Wpointer-arith -Wcast-qual
index 2f54653..3bcbb54 100644 (file)
@@ -1,9 +1,7 @@
-# $OpenBSD: Makefile,v 1.1 2016/07/19 16:54:26 reyk Exp $
+# $OpenBSD: Makefile,v 1.2 2016/07/19 18:14:08 reyk Exp $
 
-NAME=          switch
-
-PROG=          ${NAME}d
-MAN=           ${NAME}d.8 ${NAME}d.conf.5
+PROG=          switchd
+MAN=           switchd.8 switchd.conf.5
 
 SRCS=          imsg_util.c log.c packet.c switch.c timer.c util.c
 SRCS+=         switchd.c ofp.c ofp10.c ofp13.c control.c proc.c
@@ -13,8 +11,7 @@ SRCS+=                parse.y ofcconn.c
 LDADD=         -levent -lutil
 DPADD=         ${LIBEVENT} ${LIBUTIL}
 
-CFLAGS+=       -DSWITCHD_NAME=\"${NAME}\"
-CFLAGS+=       -Wall -I${.CURDIR} -I${.CURDIR}/../${NAME}d
+CFLAGS+=       -Wall -I${.CURDIR} -I${.CURDIR}/../switchd
 CFLAGS+=       -Wstrict-prototypes -Wmissing-prototypes
 CFLAGS+=       -Wmissing-declarations
 CFLAGS+=       -Wshadow -Wpointer-arith -Wcast-qual
index 7dba07e..9e905ac 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: types.h,v 1.1 2016/07/19 16:54:26 reyk Exp $  */
+/*     $OpenBSD: types.h,v 1.2 2016/07/19 18:14:08 reyk Exp $  */
 
 /*
  * Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org>
@@ -23,9 +23,7 @@
 #define SWITCHD_USER   "_hostapd"
 #endif
 
-#ifndef SWITCHD_NAME
 #define SWITCHD_NAME   "switch"
-#endif
 
 #ifndef SWITCHD_CONFIG
 #define SWITCHD_CONFIG "/etc/" SWITCHD_NAME "d.conf"