#
#   Makefile for PCRE
#
#   Generated by iMatix Boom
#   
#   Copyright (c) 1996-2009 iMatix Corporation
#   All rights reserved.
#   
#   This file is licensed under the BSD license as follows:
#   
#   Redistribution and use in source and binary forms, with or without
#   modification, are permitted provided that the following conditions
#   are met:
#   
#   * Redistributions of source code must retain the above copyright
#     notice, this list of conditions and the following disclaimer.
#   * Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in
#     the documentation and/or other materials provided with the
#     distribution.
#   * Neither the name of iMatix Corporation nor the names of its
#     contributors may be used to endorse or promote products derived
#     from this software without specific prior written permission.
#   
#   THIS SOFTWARE IS PROVIDED BY IMATIX CORPORATION "AS IS" AND ANY
#   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IMATIX CORPORATION BE
#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
#   BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
#   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
#   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
#   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#   Default values for object, library, and executable extensions.
#
OBJ = .o
LIB = .a
EXE =
CC  = c -q

#   Reset the suffixes that will be considered to just our own list.
#
#   Make programs use the .SUFFIXES psuedo rule for this

.SUFFIXES:
.SUFFIXES: $(EXE) $(LIB) $(OBJ) .c .d .i .l

#   Objects depend on source files with the same name; and are compiled
#   with the iMatix c script without any arguments.
#
.c$(OBJ):
	$(CC) $<
#   And .c files _do_not_ depend on .l files (.l files are Libero files,
#   not lex input files as the default rules think).
#
#   The semicolon forces make to accept the rule as an override.
#
.l.c: ;

#
#   Default rule -- all depends on everything.
#   We do this so that we can define the rule at the end.
#
all: everything
#
#   The following targets are not files. Mark them as such.
#
.PHONY: all generate everything install regen clean
#
#   Dependencies
#
libpcre$(LIB): pcre_chartables$(OBJ) pcre_compile$(OBJ) pcre_config$(OBJ) pcre_dfa_exec$(OBJ) pcre_exec$(OBJ) pcre_fullinfo$(OBJ) pcre_get$(OBJ) pcre_globals$(OBJ) pcre_info$(OBJ) pcre_maketables$(OBJ) pcre_ord2utf8$(OBJ) pcre_refcount$(OBJ) pcre_study$(OBJ) pcre_tables$(OBJ) pcre_try_flipped$(OBJ) pcre_ucp_searchfuncs$(OBJ) pcre_valid_utf8$(OBJ) pcre_version$(OBJ) pcre_xclass$(OBJ) 
	$(CC) -r libpcre$(LIB) pcre_chartables$(OBJ) pcre_compile$(OBJ) pcre_config$(OBJ) pcre_dfa_exec$(OBJ) pcre_exec$(OBJ) pcre_fullinfo$(OBJ) pcre_get$(OBJ) pcre_globals$(OBJ) pcre_info$(OBJ) pcre_maketables$(OBJ) pcre_ord2utf8$(OBJ) pcre_refcount$(OBJ) pcre_study$(OBJ) pcre_tables$(OBJ) pcre_try_flipped$(OBJ) pcre_ucp_searchfuncs$(OBJ) pcre_valid_utf8$(OBJ) pcre_version$(OBJ) pcre_xclass$(OBJ) 
pcre_chartables$(OBJ): pcre_chartables.c
pcre_compile$(OBJ): pcre_compile.c pcre_internal.h config.h pcre.h ucp.h pcre_printint.src
pcre_config$(OBJ): pcre_config.c
pcre_dfa_exec$(OBJ): pcre_dfa_exec.c
pcre_exec$(OBJ): pcre_exec.c
pcre_fullinfo$(OBJ): pcre_fullinfo.c
pcre_get$(OBJ): pcre_get.c
pcre_globals$(OBJ): pcre_globals.c
pcre_info$(OBJ): pcre_info.c
pcre_maketables$(OBJ): pcre_maketables.c
pcre_ord2utf8$(OBJ): pcre_ord2utf8.c
pcre_refcount$(OBJ): pcre_refcount.c
pcre_study$(OBJ): pcre_study.c
pcre_tables$(OBJ): pcre_tables.c
pcre_try_flipped$(OBJ): pcre_try_flipped.c
pcre_ucp_searchfuncs$(OBJ): pcre_ucp_searchfuncs.c ucpinternal.h ucptable.c
pcre_valid_utf8$(OBJ): pcre_valid_utf8.c
pcre_version$(OBJ): pcre_version.c
pcre_xclass$(OBJ): pcre_xclass.c
dftables$(OBJ): dftables.c
dftables$(EXE): dftables$(OBJ) libpcre$(LIB) 
	$(CC) -L dftables
pcregrep$(OBJ): pcregrep.c
pcregrep$(EXE): pcregrep$(OBJ) libpcre$(LIB) 
	$(CC) -L pcregrep
pcredemo$(OBJ): pcredemo.c
pcredemo$(EXE): pcredemo$(OBJ) libpcre$(LIB) 
	$(CC) -L pcredemo
pcretest$(OBJ): pcretest.c pcreposix.h
pcretest$(EXE): pcretest$(OBJ) libpcre$(LIB) 
	$(CC) -L pcretest

everything: generate libpcre$(LIB) dftables$(EXE) pcregrep$(EXE) pcredemo$(EXE) pcretest$(EXE) 
install:
	sh boomake install
generate: stamp_generate
stamp_generate:
	sh boomake regen
regen:
	sh boomake regen
clean:
	sh boomake clean

