# # IRBOX, an Ivy driver for infra-red remote controls # # Copyright 1998-1999 # Centre d'Etudes de la Navigation Aerienne # # Makefile # # Authors: Stephane Chatty # # $Id$ # # Please refer to file version.h for the # copyright notice regarding this software # SHELL = /bin/sh CC = gcc IRBOX_DIR = /usr/lib/irbox-1.0 SRCS = irdev.c irtable.c irbox.c OBJS = irdev.o irtable.o lex.yy.o y.tab.o irbox.o CDEFS = -DDEFAULT_IRBOX_DIR=\"$(IRBOX_DIR)\" COPTS = -g -Wall CINCS = -I../../../libraries/ivy-c/src CLIBS = -I../../../libraries/ivy-c/src CFLAGS = $(CDEBUGFLAGS) $(CDEFS) $(COPTS) $(CINCS) LDFLAGS = $(COPTS) $(CLIBS) all: irbox irbox: $(OBJS) $(CC) $(LDFLAGS) -o irbox $(OBJS) -livy irdev.o: irdev.h irbox.o: irdev.h y.tab.h y.tab.c: gram.y yacc -d gram.y lex.yy.c: gram.l lex gram.l lex.yy.o: lex.yy.c y.tab.h clean: -/bin/rm -f *.a *.o *.out *.bak *.yy.* *.tab.* *.log irbox install: all test -d $(PREFIX)/usr/bin || mkdirhier $(PREFIX)/usr/bin test -d $(PREFIX)$(IRBOX_DIR) || mkdirhier $(PREFIX)$(IRBOX_DIR) test -d $(PREFIX)/etc/rc.d/init.d || mkdirhier $(PREFIX)/etc/rc.d/init.d test -d $(PREFIX)/etc/rc.d/rc2.d || mkdirhier $(PREFIX)/etc/rc.d/rc2.d test -d $(PREFIX)/etc/rc.d/rc3.d || mkdirhier $(PREFIX)/etc/rc.d/rc3.d test -d $(PREFIX)/etc/rc.d/rc4.d || mkdirhier $(PREFIX)/etc/rc.d/rc4.d test -d $(PREFIX)/etc/rc.d/rc5.d || mkdirhier $(PREFIX)/etc/rc.d/rc5.d install -m755 irbox.init $(PREFIX)/etc/rc.d/init.d/irbox ln -s $(PREFIX)/etc/rc.d/init.d/irbox $(PREFIX)/etc/rc.d/rc2.d/S98irbox ln -s $(PREFIX)/etc/rc.d/init.d/irbox $(PREFIX)/etc/rc.d/rc3.d/S98irbox ln -s $(PREFIX)/etc/rc.d/init.d/irbox $(PREFIX)/etc/rc.d/rc4.d/S98irbox ln -s $(PREFIX)/etc/rc.d/init.d/irbox $(PREFIX)/etc/rc.d/rc5.d/S98irbox install -m755 irbox.conf $(PREFIX)/etc/ install -m755 irbox $(PREFIX)/usr/bin for f in `find ../data -type f -maxdepth 1`; do \ install -m 644 $$f $(PREFIX)$(IRBOX_DIR); \ done