# Makefile for HEYU, a program to control an X10 CM11A computer interface. # This makefile is generated by the Configure program. # BIN = /usr/local/bin MAN = /usr/local/man/man1 MAN5 = /usr/local/man/man5 GROUP = sys OWNER = root # set DFLAGS equal to: # -DSYSV if using SYSTEM V # -DVOID if compiler doesn't understand 'void' #This makefile is built for freebsd CC ?= gcc CFLAGS += -g -O $(DFLAGS) -Wall LIBS = -lm -lc DFLAGS= -DHASSELECT -DNEEDGTIME -DFREEBSD # # The rest of the makefile should need no changes ## Makefile template for Heyu, a program to control an X10 CM11A computer ## interface. From this point on the Makefile is copied from Makefile.in ## by the Configure program SRCS = date.c erase.c info.c message.c relay.c \ monitor.c reset.c setclock.c stop.c \ tty.c turn.c x10.c xread.c xwrite.c status.c cm11a.c \ eeprom.c preset.c parse_sched.c OBJS = date.o erase.o info.o message.o relay.o \ monitor.o reset.o setclock.o stop.o \ tty.o turn.o x10.o xread.o xwrite.o status.o cm11a.o \ eeprom.o preset.o parse_sched.o OTHERSRC = README Makefile x10config protocol.txt eeprom.h \ x10sched.conf.sample monit x10biff heyu.1 x10.h x10config.5 \ history.txt version.h heyufaq.txt x10sched.5 makesched sunrise.c \ Configure Makefile.in dusk.c install.sh INSTALL heyuhelper heyuhelper.1 EVERYTHING = $(OTHERSRC) $(SRCS) all: heyu dawndusk heyu: $(OBJS) version.h $(CC) $(LDFLAGS) -o heyu $(OBJS) $(LIBS) $(OBJS): x10.h eeprom.o: eeprom.h install: $(BIN)/heyu $(MAN)/heyu.1 $(MAN5)/x10config.5 $(MAN5)/x10sched.5\ $(BIN)/dawndusk $(BIN)/makesched $(BIN)/heyuhelper $(MAN)/heyuhelper.1 uninstall: rm -f $(BIN)/heyu rm -f $(BIN)/makesched rm -f $(BIN)/heyuhelper rm -f $(BIN)/dawndusk rm -f $(MAN)/heyu.1 rm -f $(MAN5)/heyuhelper.1 rm -f $(MAN5)/x10config.5 rm -f $(MAN5)/x10sched.5 $(BIN)/heyu: heyu cp heyu $(BIN) chgrp $(GROUP) $(BIN)/heyu chmod 755 $(BIN)/heyu chown $(OWNER) $(BIN)/heyu $(BIN)/makesched: makesched cp makesched $(BIN) chgrp $(GROUP) $(BIN)/makesched chmod 755 $(BIN)/makesched chown $(OWNER) $(BIN)/makesched $(BIN)/heyuhelper: heyuhelper if test ! -f $(BIN)/heyuhelper ; then cp heyuhelper $(BIN) ; fi chgrp $(GROUP) $(BIN)/heyuhelper chmod 755 $(BIN)/heyuhelper chown $(OWNER) $(BIN)/heyuhelper $(BIN)/dawndusk: dawndusk cp dawndusk $(BIN) chgrp $(GROUP) $(BIN)/dawndusk chmod 755 $(BIN)/dawndusk chown $(OWNER) $(BIN)/dawndusk $(MAN)/heyu.1: heyu.1 if test ! -d $(MAN) ; then mkdir -p -m 775 $(MAN) ; fi cp heyu.1 $(MAN) chmod 644 $(MAN)/heyu.1 $(MAN)/heyuhelper.1: heyuhelper.1 if test ! -d $(MAN) ; then mkdir -p -m 775 $(MAN) ; fi cp heyuhelper.1 $(MAN) chmod 644 $(MAN)/heyuhelper.1 $(MAN5)/x10config.5: x10config.5 if test ! -d $(MAN5) ; then mkdir -p -m 775 $(MAN5) ; fi cp x10config.5 $(MAN5) chmod 644 $(MAN5)/x10config.5 $(MAN5)/x10sched.5: x10sched.5 if test ! -d $(MAN5) ; then mkdir -p -m 775 $(MAN5) ; fi cp x10sched.5 $(MAN5) chmod 644 $(MAN5)/x10sched.5 lint: lint $(DFLAGS) $(SRCS) shar: x10_heyu.shar.1 x10_heyu.shar.2 x10.o: x10.c version.h ci: $(SRCS) index.html Makefile @ for FL in $+ ; do \ if test -w $$FL ; then \ ci -l $$FL ;\ fi ;\ done x10_heyu.shar.1: shar $(OTHERSRC) >x10_heyu.shar.1 x10_heyu.shar.2: shar $(SRCS) > x10_heyu.shar.2 bigshar: shar $(EVERYTHING) > x10_heyu.shar tar: x10_heyu.tgz x10_heyu.tgz: $(EVERYTHING) rm -fr heyu.dir mkdir heyu.dir cp -p $(EVERYTHING) heyu.dir cp Makefile.dist heyu.dir/Makefile tar -czvf x10_heyu.tgz heyu.dir beta: x10_beta.tgz x10_beta.tgz: $(EVERYTHING) rm -fr heyu.beta mkdir heyu.beta cp -p $(EVERYTHING) heyu.beta cp Makefile.dist heyu.dir/Makefile tar -czvf x10_beta.tgz heyu.beta zip: x10_heyu.zip x10_heyu.zip: $(EVERYTHING) rm -f x10_heyu.zip zip -kl x10_heyu.zip $(EVERYTHING) touch: touch $(OTHERSRC) touch $(SRCS) clean: rm -f *.o clobber: clean rm -f heyu upload: heyu index.html x10_heyu.tgz x10_heyu.zip /bin/sh -c ./upload.sh rcsdiffrw: @-for x in `$(MAKE) rw` ;\ do \ echo ;\ echo $$x ;\ echo ========= ;\ rcsdiff $$x ;\ done 2>&1 ;\ echo ;\ echo all done dawndusk: dusk.o sunrise.o $(CC) -o dawndusk dusk.o sunrise.o $(LIBS) list: @ls $(EVERYTHING) | more rw: @ls -l $(EVERYTHING) | \ egrep '^[^l].w' | \ sed 's;.* ;;' # strip to last space populate: $(EVERYTHING) $(EVERYTHING): co -r$(revision) $@