# If you want the standard cyan-on-black LED color display,
# change this to STD_COLOR. You can also change colors in pixmaps.h
COLOR	= NO_STD_COLOR
#COLOR	= STD_COLOR

# If your 2.[12] kernel headers aren't in /usr/include(/linux),
# you'll need to specify their location here.
#KERNELINCS	= /usr/src/linux/include

# The directory into which you want to install
INSTALLROOT 	= /usr/local

# The directories in which the binary and man page should
# be installed.
BINDIR		= $(INSTALLROOT)/bin
MANDIR		= $(INSTALLROOT)/man/man1

# The device to access by default (can be changed at runtime)
DEVICE		= /dev/radio

# These should be OK ---------------------------------------

CC	= cc
ALL_CFLAGS	= $(shell gtk-config --cflags) -O2 -Wall $(CFLAGS) $(KERNELINCS)
LIBS	= $(shell gtk-config --libs)
SRCS	= ui.c gradio-main.c callbacks.c interface.c lowlevel.c
OBJS	= $(SRCS:.c=.o)
HDRS	= gradio.h pixmaps.h logo.h
DEFS	= -D$(COLOR) -DDEV_NAME=\"$(DEVICE)\"

all: $(SRCS) $(HDRS) $(OBJS)
	$(CC) -o gradio $(OBJS) $(ALL_CFLAGS) $(LIBS)

install: gradio
	cp gradio $(BINDIR)
	cp gradio.1 $(MANDIR)

.c.o: $(HDRS)
	$(CC) -c $(ALL_CFLAGS) $(DEFS) $<

clean:
	rm -f *.o gradio *~ core
