summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 7b759a4..15a73c1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
CC?=gcc
-CFLAGS+= -lrt
+
+# Run this with make LIBS=-lrt if you want to compile on kfreebsd
all: macping mndp mactelnet mactelnetd
@@ -10,6 +11,8 @@ dist-clean:
rm -f mactelnet macping mactelnetd mndp
rm -f *.o
+dist: dist-clean po/mactelnet.pot
+
install: all install-docs
install -d $(DESTDIR)/usr/bin
install mndp $(DESTDIR)/usr/bin/
@@ -24,6 +27,9 @@ install-docs:
install -d $(DESTDIR)/usr/share/man/man1/
install docs/*.1 $(DESTDIR)/usr/share/man/man1/
+po/mactelnet.pot: *.c
+ xgettext --package-name=mactelnet --msgid-bugs-address=haakon.nessjoen@gmail.com -d mactelnet -C -c_ -k_ -kgettext_noop *.c -o po/mactelnet.pot
+
users.o: users.c users.h
${CC} -Wall ${CFLAGS} -DUSERSFILE='"/etc/mactelnetd.users"' -c users.c
@@ -37,13 +43,13 @@ md5.o: md5.c md5.h
${CC} -Wall ${CFLAGS} -c md5.c
mactelnet: config.h mactelnet.c mactelnet.h protocol.o console.c console.h interfaces.o md5.o
- ${CC} -Wall ${CFLAGS} -o mactelnet mactelnet.c protocol.o console.c interfaces.o md5.o
+ ${CC} -Wall ${CFLAGS} ${LDFLAGS} -o mactelnet mactelnet.c protocol.o console.c interfaces.o md5.o ${LIBS}
mactelnetd: config.h mactelnetd.c protocol.o interfaces.o console.c console.h users.o users.h md5.o
- ${CC} -Wall ${CFLAGS} -o mactelnetd mactelnetd.c protocol.o console.c interfaces.o users.o md5.o
+ ${CC} -Wall ${CFLAGS} ${LDFLAGS} -o mactelnetd mactelnetd.c protocol.o console.c interfaces.o users.o md5.o ${LIBS}
mndp: config.h mndp.c protocol.o
- ${CC} -Wall ${CFLAGS} -o mndp mndp.c protocol.o
+ ${CC} -Wall ${CFLAGS} ${LDFLAGS} -o mndp mndp.c protocol.o ${LIBS}
macping: config.h macping.c interfaces.o protocol.o
- ${CC} -Wall ${CFLAGS} -o macping macping.c interfaces.o protocol.o
+ ${CC} -Wall ${CFLAGS} ${LDFLAGS} -o macping macping.c interfaces.o protocol.o ${LIBS}