aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile6
-rw-r--r--config.mk6
-rw-r--r--mongoclock.c1
3 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 376a12e..cb06e32 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ DIGITS =\
mongo_5.h mongo_6.h mongo_7.h mongo_8.h mongo_9.h \
mongo_c.h
+
all: mongoclock
mongoclock: mongoclock.o
@@ -51,18 +52,15 @@ mongo_c.h: digit.sh
install: mongoclock
mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
- mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/mongoclock"
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
cp -- mongoclock "$(DESTDIR)$(PREFIX)/bin/"
- cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/mongoclock/"
cp -- mongoclock.1 "$(DESTDIR)$(MANPREFIX)/man1/"
uninstall:
-rm -- "$(DESTDIR)$(PREFIX)/bin/mongoclock"
-rm -- "$(DESTDIR)$(MANPREFIX)/man1/mongoclock.1"
- -rm -r -- "$(DESTDIR)$(PREFIX)/share/licenses/mongoclock"
clean:
- -rm -f -- *.o mongoclock mongo_*.h
+ -rm -f -- *.o *.su mongoclock mongo_*.h
.PHONY: all install uninstall clean
diff --git a/config.mk b/config.mk
index 1c42502..fa63802 100644
--- a/config.mk
+++ b/config.mk
@@ -1,6 +1,8 @@
-PREFIX = /usr/local
+PREFIX = /usr
MANPREFIX = $(PREFIX)/share/man
+CC = cc
+
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE -DUSE_ADJTIMEX
-CFLAGS = -std=c99 -Wall -Wextra -O2
+CFLAGS = -std=c99 -Wall -O2
LDFLAGS = -s
diff --git a/mongoclock.c b/mongoclock.c
index 6e8b6a0..6218d5f 100644
--- a/mongoclock.c
+++ b/mongoclock.c
@@ -33,6 +33,7 @@
#include "mongo_9.h"
#include "mongo_c.h"
+
static const char **mongo_ds[] = {
mongo_0, mongo_1, mongo_2, mongo_3, mongo_4,
mongo_5, mongo_6, mongo_7, mongo_8, mongo_9