# makefile for rawkey lib.
# do a 'make install' as root.

#---------------------------------------------------------------
# Note: I hacked this a bit for the lux distribution -- fpm
#---------------------------------------------------------------

# you might want to change these, but probably not.
LIBDIR=/usr/lib
INCLUDEDIR=/usr/include

CFLAGS=-I. -L.   # for 'testprog'

ifeq ($(strip $(TOP_LEVEL)),)
all: error
else
all: librawkey.a 
endif

librawkey.a: rawkey.o
	ar rcs librawkey.a rawkey.o

install:
	install -m 444 librawkey.a $(LIBDIR)
	install -m 444 rawkey.h $(INCLUDEDIR)
	@echo Rawkey library installed.

clean:
	rm -f *.o *~ librawkey.a testprog a b c

error:
	@echo '+-------------------------------------------+'
	@echo '| Please run the top level Makefile instead |'
	@echo '|            of this one                    |'
	@echo '+-------------------------------------------+'