SRC = main.C bill.C sum.C merge.C
OBJ = main.o bill.o sum.o merge.o

# Include common include file, contains first target

include ../common

all: billing

billing: ${OBJ}
	$(CPP) -o billing $(CFLAGS) $(CCLINKFLAGS) $(OBJ) $(DBOXLIBS) $(LIBS)

clean:
	rm -f *.o billing billing.exe .depend

update_bin:
        ifeq (WIN32,$(OS))
	echo cp \$$DIST/billing/billing.exe ${DBOXBINDIR} >> ../dbsetup/dosetup.sh
        else
	echo cp \$$DIST/billing/billing ${DBOXBINDIR} >> ../dbsetup/dosetup.sh
        endif

dosetup:
	echo \#              >> ../dbsetup/dosetup.sh
	echo \# Install billing >> ../dbsetup/dosetup.sh
	echo \#              >> ../dbsetup/dosetup.sh
        ifeq (WIN32,$(OS))
	echo cp \$$DIST/billing/billing.exe ${DBOXBINDIR} >> ../dbsetup/dosetup.sh
        else
	echo cp \$$DIST/billing/billing ${DBOXBINDIR} >> ../dbsetup/dosetup.sh
        endif

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
