1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
# ------------------ USER CONFIGURABLE SETTINGS ---------------------------
# The directories where files will be installed, you may want to change these.
BINDIR=usr/sbin
ETCDIR=etc
# Compiler flags.
CC = gcc
CFLAGS = -O2 -g -Wall -pipe -Dlint
# If you are using gcc 2.5.8 this will get you QMAGIC executables
# later versions of gcc do this by default.
#LDFLAGS = -Xlinker -qmagic
LDFLAGS =
# ------------------ END OF USER CONFIGURATIONS ---------------------------
OBJFILES=apcd.o parse.o upsnet.o
SOURCEFILES=apcd.c parse.c upsnet.c
HFILES=apcd.h version.h
DOCFILES=README
DISTFILES=Makefile $(SOURCEFILES) $(HFILES) $(DOCFILES)
all: apcd
apcd.o: apcd.c apcd.h
parse.o: parse.c apcd.h
upsnet.o: upsnet.c apcd.h
apcd: $(OBJFILES)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJFILES) -o apcd
install: apcd
install -o root -g root apcd ${DESTDIR}/${BINDIR}/apcd
install -o root -g root apcstat ${DESTDIR}/${BINDIR}/apcstat
install -o root -g root -m 644 apcd.conf ${DESTDIR}/${ETCDIR}/apcd.conf
install -o root -g root apcd.cron ${DESTDIR}/${ETCDIR}/cron.weekly/apcd
clean:
rm -f *.o apcd
dep:
$(CPP) -M *.c > .depend
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
|