case 'd':
debug++;
switch (debug) {
- case 1:
- setloglevel(LOG_DEBUG);
- break;
- case 2:
- options->daemonise = false;
- break;
+ case 1:
+ setloglevel(LOG_DEBUG);
+ break;
+ case 2:
+ options->daemonise = false;
+ break;
}
break;
#ifdef THERE_IS_NO_FORK
close_fds();
break;
case 'g':
- dhcpcd_skiproutes = xstrdup (optarg);
+ dhcpcd_skiproutes = xstrdup(optarg);
break;
#endif
case 'h':
free(dstd);
}
+
int
add_address(const char *ifname, struct in_addr address,
struct in_addr netmask, struct in_addr broadcast)
${PROG}: ${SCRIPTS} ${OBJS}
${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD}
+# We could save about 500 bytes by building it like this
+# instead of the more traditional method above
+#${PROG}: ${SRCS}
+# echo "" > _${PROG}.c
+# for src in ${SRCS}; do echo "#include \"$$src\"" >> _${PROG}.c; done
+# ${CC} ${CFLAGS} -DSYSLOG_NAMES -c _${PROG}.c -o _${PROG}.o
+# ${CC} ${LDFLAGS} -o $@ _${PROG}.o ${LDADD}
+
_proginstall: ${PROG}
${INSTALL} -d ${DESTDIR}${BINDIR}
${INSTALL} -m ${BINMODE} ${PROG} ${DESTDIR}${BINDIR}
install: _proginstall maninstall
clean:
- rm -f ${OBJS} ${PROG} ${CLEANFILES}
+ rm -f ${OBJS} ${PROG} _${PROG}.c _${PROG}.o ${CLEANFILES}
LINTFLAGS?= -hx
LINTFLAGS+= -X 159,247,352