CFLAGS=-O2 -I../../include -I/usr/realtime/include \
        -I/usr/src/linux/include -Wall \
         -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing \
          -fno-common -pipe


all: clean ogLCD report.o MtxOrb.o install wrtMsg

ogLCD: report.o MtxOrb.o ogLCD.c
	gcc $(CFLAGS) ogLCD.c report.o MtxOrb.o -o ogLCD -lpthread


report.o: report.c report.h
	gcc -g -Wall -c report.c

MtxOrb.o: MtxOrb.c MtxOrb.c lcd.h report.h report.c
	gcc -g -Wall -c MtxOrb.c

wrtMsg: wrtMsg.c
	gcc -g -Wall wrtMsg.c MtxOrb.o report.o -o wrtMsg

clean:
	rm -f *.o ogLCD

install:
	cp ogLCD /usr/local/bin/
	chmod u+s /usr/local/bin/ogLCD
	cp wrtMsg /usr/local/bin/
