CC = gcc
LIB= ../lib/libconio.a

# 
# compiler options 
# 
CPPOPT=
CFLAGS= -fPIC -Wall $(CPPOPT) -fomit-frame-pointer -O2
LFLAGS= -s

OBJS	= lnxconio.o
LIBS	= $(LIB) -lncurses
PROGS	= iotest

#
# default rules:
#    C -> ASM rules are there to look at the generated code
#    when using inline assembly
#
.o:
	$(CC) $(LFLAGS) -o $* $*.o $(LIBS)

.c.o:
	$(CC) -c $(CFLAGS) $*.c

#
# default targets:
#
all: $(LIB) $(PROGS)

clean:
	rm -f *.o $(PROGS)

$(LIB): $(OBJS)
	rm -f $(LIB)
	ar rvs $(LIB) $(OBJS)

iotest: $(LIB) iotest.o

gppconio.o : gppconio.c ../../include/grx.h gppconio.h 

