# Generated automatically from Makefile.in by configure.
# Makefile.in: -*- Text -*-  Source for configure to make a Makefile from.
#
# Author: Brian J. Fox (bfox@ai.mit.edu).
# This file is part of <Meta-HTML>(tm), a system for the rapid deployment
# of Internet and Intranet applications via the use of the Meta-HTML
# language.
#
#  Copyright (c) 1995, 1996, Brian J. Fox (bfox@ai.mit.edu).
#  Copyright (c) 1996, Universal Access Inc. (http://www.ua.com).
#
# Meta-HTML is free software; you can redistribute it and/or modify
# it under the terms of the UAI Free Software License as published
# by Universal Access Inc.; either version 1, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# UAI Free Software License for more details.
#
# You should have received a copy of the UAI Free Software License
# along with this program; if you have not, you may obtain one by
# writing to:
#
# Universal Access Inc.
# 129 El Paseo Court
# Santa Barbara, CA
# 93101

# Items that were filled in by configure.
srcdir	= .
DEFS	= -DHAVE_CONFIG_H
INSTALL = /usr/bin/install -c
REGEX_IN= -I../libutils/regex
GDBM_IN = -I/usr/include
MSQL_IN = -I../../msql/targets/Linux-2.0.33-i686/msql -DMSQL_DATABASE
ODBC_IN = 
DES_IN	= -I../../libdes -DMHTML_CRYPTOGRAPHY
MSQLFUNCS_O = @MSQLFUNCS_O@
ODBCFUNCS_O = 
CRYPTFUNCS_O = cryptfuncs.o
DES_LIB = @DES_LIB@
DBINC	= $(GDBM_IN) $(MSQL_IN) $(ODBC_IN) $(DES_IN)
OS_NAME = linux
OS_LIBS = -lcrypt   -lm -ldl
prefix	= /www
exec_prefix = ${prefix}

bindir	= $(exec_prefix)/bin
libdir	= $(exec_prefix)/lib
incdir	= $(prefix)/include

#
RM = rm -f
LN = ln
CP = cp
MV = mv
AR = ar
RANLIB = ranlib
MKDIR = mkdir
TAR = tar

#
# ALL_SUBDIRS is the list of all of the subdirectories within which we
# would like to run various `make's, or ".", which means that there
# are no subdirectories.
ALL_SUBDIRS = .

VERSION = 0.1
DISTNAME = libcompiler-$(VERSION)
WEBBASEDIR = 

CC = gcc
# PROFILE_FLAGS = -pg
# OPTIMIZE_FLAGS = -O69
DEBUG_FLAGS = -g -DTEST $(PROFILE_FLAGS)
GCC_WARN = -Wall -Wstrict-prototypes -Wno-unused
CFLAGS = $(GCC_WARN) $(OPTIMIZE_FLAGS) $(DEBUG_FLAGS)
LDFLAGS = $(OPTIMIZE_FLAGS) $(DEBUG_FLAGS)
LIBRARIES = $(LIBPATHS) $(REQUIRED_LIBS)
INCLUDES =   -I. -I.. -I$(LIBDIR) $(REGEX_IN) $(DBINC) \
		-I../libutils -I../libmhtml

.c.o:
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) -I.. -c $<

LIB_CSRC = object.c core.c parse.c expand.c optimize.c generate.c \
	   compile.c engine.c test.c

LIB_HSRC = object.h byte_ops.h code.h core.h parse.h compile.h xmalloc.h

LIB_OBJS = object.o core.o parse.o expand.o optimize.o generate.o \
	   compile.o engine.o xmalloc.c

TARGET_LIB = libcompiler.a
TEST_PROGS = test
TEST_OBJS  =

TARGETS = $(TARGET_LIB) $(TEST_PROGS)

all: $(TARGETS)

$(TARGET_LIB): $(LIB_OBJS)
	$(RM) $@
	$(AR) cq $@ $(LIB_OBJS)
	if [ "$(RANLIB)" ]; then $(RANLIB) $@; fi

test: $(LIB_OBJS) test.o
	$(CC) $(CFLAGS) -o bc test.o $(LIB_OBJS) -lefence
	
Makefile: Makefile.in
	(cd ..; ./config.status)

tags TAGS: FORCE
	etags *.c *.h

clean: FORCE
	$(RM) *.o *.a $(TARGETS) initfuncs.c

distclean realclean: clean
	$(RM) *.o core *~ DISTFILES *.bak *.gz foo *\#* Makefile

dist: DISTFILES
	$(RM) -rf $(DISTNAME)
	$(MKDIR) $(DISTNAME)
	for d in `find $(ALL_SUBDIRS) -type d -print`; do \
	  if [ "$$d" != "." -a "$$d" != "./$(DISTNAME)" ]; then \
	    mkdir $(DISTNAME)/$$d; \
	  fi \
	done
	for f in `cat DISTFILES`; do \
	  $(LN) $(srcdir)/$$f $(DISTNAME)/$$f || \
		{ echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
	done
	(cd $(DISTNAME); $(MAKE) $(MFLAGS) distclean)
	$(TAR) chvf - $(DISTNAME) | gzip >$(DISTNAME).tar.gz
	$(RM) -rf $(DISTNAME)

# Gets rid of most of the unwanted files.  Verify manually (if necessary)
# that this produces a list of all the files desired in the distribution. 
DISTFILES: FORCE
	$(RM) -rf $(DISTNAME)
	(cd $(srcdir); find . ! -type d -print) \
	| sed  '/\/RCS\//d; \
	       /\/EMACS-BACKUPS\//d; \
	       /\.tar.*/d; \
	       /~$$/d; /\.o$$/d; \
	       /\/config\.status$$/d; \
	       /\/.*\.BAK$$/d; \
	       /\/TAGS$$/d; \
	       /\/a.out$$/d; \
	       /\/=/d; \
	       /\/conftest\.c$$/d; \
	       /\/DISTFILES$$/d; \
	       /\/xact\/xact$$/d; \
	       /\.toc$$/d; \
	       /\.aux$$/d; /\.log$$/d; \
	       /\.cps$$/d; /\.cp$$/d; \
	       /\.fns$$/d; /\.fn$$/d; \
	       /\.tps$$/d; /\.tp$$/d; \
	       /\.vrs$$/d; /\.vr$$/d; \
	       /\.pgs$$/d; /\.pg$$/d; \
	       /\.kys$$/d; /\.ky$$/d; \
	       s/^.\///; /^\.$$/d;' \
	| sort | uniq > DISTFILES


FORCE:
