#
# BACKUPD Makefile for Linux
#
# Ullrich von Bassewitz, 25.06.1998
#


# ------------------------------------------------------------------------------
# Definitions

# Names of executables
AR = ar
LD = ld
CC = gcc

# Flags for the compiler
CFLAGS 	= -DLINUX -g -I $(INCDIR) -O2 -Wall

# ------------------------------------------------------------------------------
# All OBJ files

OBJS =	backupd.o	\
	config.o	\
	util.o


%.o:	%.cc
	$(CC) $(CFLAGS) -c $< -o $@

# ------------------------------------------------------------------------------
# Dummy targets

.PHONY:	all
ifeq (.depend,$(wildcard .depend))
all:	backupd backupc
include .depend
else
all:	depend
endif

# ------------------------------------------------------------------------------
# Create the executables

backupd:	$(OBJS)
		gcc $(CFLAGS) -o $@ $(OBJS)

backupc:	backupc.o
		gcc $(CFLAGS) -o $@ backupc.o

# ------------------------------------------------------------------------------
# Create a dependency file

depend dep:				     
	@echo "Creating dependency information"
	$(CC) -I$(INCDIR) -DLINUX -MM *.c > .depend

# ------------------------------------------------------------------------------
# clean up


