# === Makefile ================================================================
#
#    (C) 1995 Chris Provenzano
#
#    Description: This file is for creating fc
#
INSTALL_PATH = $${HOME}
      BINDIR = $(INSTALL_PATH)/bin/@sys
      LIBDIR = $(INSTALL_PATH)/lib/@sys
      MANDIR = $(INSTALL_PATH)/man
      INCDIR = $(INSTALL_PATH)/h

        MAKE = make
          CC = gcc
         CPP = $(CC) -E -I$(INCDIR)
      CFLAGS = -c -O $(CDEBUGFLAGS)
 CDEBUGFLAGS = -g -DDEBUG		# -g, -O, -DDEBUG
          LD = 

        CSRC = cluster.c fc_key.c fc_file.c fc_group.c fc_init.c fc_done.c \
               fc_do_key.c fc_do_file.c fc_do_group.c fc_help.c \
               fc_display.c fc_error.c parse.c main.c

     HEADERS = fc.h parse.h

        OBJS = cluster.o fc_key.o fc_file.o fc_group.o fc_init.o fc_done.o \
               fc_do_key.o fc_do_file.o fc_do_group.o fc_help.o \
               fc_display.o fc_error.o parse.o main.o 

      BINARY = fc

################################################################################
#
# Here starts the nitty grity part of the Makefile.

all: $(LIBRARIES) $(BINARY)

clean: 
	rm -f $(OBJS) a.out core maketmp makeout

depend:
	sed '/\#\#\# Dependencies/q' < Makefile > maketmp
	(for i in $(CSRC);do $(CPP) -M $$i;done) >> maketmp
	cp maketmp Makefile

install: all 
	install mylib.a $(LIBDIR)

realclean: clean
	rm -f $(LIBRARIES) $(BINARY)

.c.s:
	$(CC) $(CFLAGS) -S $<

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

.s.o:
	$(AS) $<

$(BINARY): $(OBJS)
	$(CC) -o $(BINARY) $(OBJS)

################################################################################
### Do not remove the following line. It is for depend #########################
### Dependencies:
