
CC = cc

# CFLAGS = -DDEBUG

CFLAGS =

# PROGS = test mtd jthrot
JOYSTICK = jthrot
JOYOBJS = jthrot.o

# uncomment these to disable joystick support
#
# JOYSTICK =
# JOYOBJS =

PROGS = mtd $(JOYSTICK)

# PGMOBJS = test.o mtd.o
PGMOBJS = mtd.o
LIBOBJS = lenz.o

OBJS = $(PGMOBJS) $(LIBOBJS) $(JOYOBJS)

all:	$(OBJS) $(PROGS)

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

test:	test.o $(LIBOBJS)
	cc -o test test.o $(LIBOBJS)

mtd:	mtd.o $(LIBOBJS)
	cc -o mtd mtd.o $(LIBOBJS)

jthrot:	jthrot.o
	cc -o jthrot jthrot.o

clean:		
	rm -f $(OBJS) $(PROGS)

# deps
lenz.o: lenz.c lenz.h common.h
mtd.o: mtd.c common.h
test.o: test.c common.h

