#
# Makefile for G0LGS's FBB Lottery Number Generator (PG)
#

VERS=0.10

# for 7.00
#BINDIR = /home/xfbb/bin/pg

# for 7.01+
BINDIR = /usr/lib/fbb/pg

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

all: lotto

CC = gcc
LD = gcc
LIBS = 

# Static
LDFLAGS = -static
# Dynamic
#LDFLAGS =

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

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

lotto.o:	Makefile lotto.c

utils.o:	Makefile utils.c utils.h

install:	all
		install -m 750 --strip lotto $(BINDIR)

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

dist:		all
		@tar -zcvf g0lgs-lottery-bin-$(VERS).tar.gz README lotto
		@echo g0lgs-lottery-bin-$(VERS).tar.gz Created

backup:		clean
		@tar -zcvf g0lgs-lottery-src-$(VERS).tar.gz README Makefile lotto.* utils.*
		@echo g0lgs-lottery-src-$(VERS).tar.gz Created

