First commit

This commit is contained in:
Steffen Lange 2018-04-08 21:34:42 +02:00
commit 0a28bac78a
37 changed files with 1963 additions and 0 deletions

26
Makefile Normal file
View file

@ -0,0 +1,26 @@
OBJECTS = trim.o map.o logger.o ini.o tcpcli.o diygeiger.o gqgeiger.o gclog.o
CFLAGS += -Wall -Wextra -Os
#LDFLAGS +=
PREFIX ?= /usr
all: gclog
gclog: $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $(OBJECTS)
which upx >/dev/null 2>&1 && upx -9 -qq $@ || true
%.o: %.c
$(CC) $(CFLAGS) -c $<
install: all
install -d $(DESTDIR)$(PREFIX)/bin
install -d $(DESTDIR)/etc
install -d $(DESTDIR)/etc/init.d
install -d $(DESTDIR)$(PREFIX)/share/man/man1
install -m 755 gclog $(DESTDIR)$(PREFIX)/bin/
install -m 600 gclog.conf $(DESTDIR)/etc/
install -m 755 gclogd $(DESTDIR)/etc/init.d/
install -m 644 gclog.1 $(DESTDIR)$(PREFIX)/share/man/man1/
clean:
-rm $(OBJECTS) 2>/dev/null