#
# Makfile for G0LGS's XFBB inf-tool
#

VERS=0.15
VDATE=(04-Apr-2002)

CFLAGS = -Wall -O2 -g -DVersion='"$(VERS)"' -DVdate='"$(VDATE)"'

BINDIR = /usr/lib/fbb/tool

all: inf-tool

CC = gcc
LD = gcc
LIBS = 

# Static
LDFLAGS = -static
# Dynamic
#LDFLAGS =

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

inf-tool:	Makefile inf-tool.o utils.o
	$(LD) $(LDFLAGS) -o inf-tool inf-tool.o utils.o $(LIBS)

inf-tool.o:	Makefile inf-tool.c

utils.o:	Makefile utils.c utils.h

install:	all
		install --strip -m 755 inf-tool $(BINDIR)
		ln -sf $(BINDIR)/inf-tool $(BINDIR)/listusr
clean:
		rm -f core *.o *.~*

dist:		all
		@strip inf-tool
		@tar -zcvf fbb-inftool-bin-$(VERS).tar.gz CHANGES README inf-tool > /dev/null
		@echo fbb-inftool-bin-$(VERS).tar.gz Created.

backup:		clean
		@tar -zcvf fbb-inftool-src-$(VERS).tar.gz Makefile CHANGES README inf-tool.* utils.* > /dev/null
		@echo fbb-inftool-src-$(VERS).tar.gz Created.

