# Generated automatically from Makefile.in by configure.
# $Id: Makefile,v 1.1 2000/05/05 20:15:25 prigaux Exp $

srcdir=.
prefix=/usr
exec_prefix=${prefix}
sbindir=${exec_prefix}/sbin
mandir=${prefix}/man

ARCH		= i386
CC		= gcc
CFLAGS		= -O3 -fomit-frame-pointer -fno-exceptions -fno-rtti -pipe -s -mpentium -mcpu=pentium -march=pentium -ffast-math -fexpensive-optimizations
LDFLAGS		= 
HOSTCC		= gcc
HOSTCFLAGS	= -O3 -fomit-frame-pointer -fno-exceptions -fno-rtti -pipe -s -mpentium -mcpu=pentium -march=pentium -ffast-math -fexpensive-optimizations
AR		= ar
RANLIB		= ranlib
INSTALL		= install
STRIP		= -s

DEFS = -I$(srcdir)/../include -D_GNU_SOURCE  
DEFS += -DELF_MACHINE_H='"elf_$(ARCH).h"' -DARCH_$(ARCH) $(EXTRA_DEFS)

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

######################################################################

all: .depend libutil.a

OBJS = sys_cm.o sys_dm.o sys_gks.o sys_nim.o sys_oim.o sys_qm.o \
	xmalloc.o xrealloc.o xstrdup.o logger.o \
	modstat.o meta_expand.o config.o snap_shot.o arch64.o

meta_expand.o: meta_expand.c
	$(CC) $(CFLAGS) $(DEFS) -DHAVE_WORDEXP=1 -DHAVE_GLOB=1 -c $<

libutil.a: $(OBJS)
	$(AR) rv $@ $?
	$(RANLIB) $@

clean:
	rm -f *.o *.a

realclean: clean
	rm -f .depend

distclean: realclean
	rm -f Makefile

install-bin: all

dep depend .depend: $(OBJS:.o=.c)
	$(CC) -M $(CFLAGS) $(DEFS) $^ > .depend

ifeq (.depend,$(wildcard .depend))
include .depend
endif
