# === Makefile ================================================================
# Copyright (c) 1994 Chris Provenzano, proven@athena.mit.edu
#
#	Description: This file is for creating the test programs for libpthread.a
#
#	1.00 94/09/18 proven
#		-Initial cut for pthreads.
#

INSTALL_PATH = 
      BINDIR = 
      LIBDIR = 
      MANDIR =
      INCDIR = ../

        MAKE = make
          AR = gar
          AS = gas
          CC = gcc
         CPP = $(CC) -E -I$(INCDIR)
      CFLAGS = -c -g -O -I$(INCDIR) -I../../include
 CDEBUGFLAGS = -g -DDEBUG		# -g, -O, -DDEBUG
       CLIBS = 
          LD = gld

        CSRC = main.c accept_buf.c

     HEADERS = accept_buf.h

        OBJS = main.o accept_buf.o

    BINARIES = chapter7

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

all: $(LIBRARIES) $(BINARIES) $(PBENCHMARKS) $(SBENCHMARKS) $(DBENCHMARKS)

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 

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

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

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

.s.o:
	$(AS) $<

$(BINARIES): $(OBJS) ../../libpthread.a
	$(CC) -static -o $@ $(OBJS) ../../libpthread.a -lm

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