# $Id$ VERSION = 0.00 PREFIX = /usr/local YACC = yacc LEX = lex CC = cc HOSTCC = $(CC) CFLAGS = -DVERSION=\"$(VERSION)\" LDFLAGS = LIBS = OBJS = Source/main.o Source/y.tab.o Source/lex.yy.o Source/function.o Source/var.o Source/util.o OBJS += Source/generate.o OBJS += Source/Function/btprint.o Source/Function/print.o Source/Function/output.o Source/Function/init.o Source/Function/have_config_h.o Source/Function/define.o Source/Function/undef.o OBJS += Source/Function/probe_cxx.o Source/Function/probe_cc.o Source/Function/probe_pkgconf.o OBJS += Source/Function/c_check_headers.o Source/Function/cxx_check_headers.o OBJS += Source/Function/cond_c_check_header.o Source/Function/cond_cxx_check_header.o Source/Function/cond_os.o OBJS += Source/Function/ifnot.o Source/Function/if.o Source/Function/endif.o Source/Function/else.o OBJS += Source/Function/package.o OBJS += Source/Function/shell.o .PHONY: all clean install .SUFFIXES: .c .o all: kmake kmake: $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) Source/y.tab.c: Source/kmakefile.y cd Source && $(YACC) -y -d kmakefile.y Source/lex.yy.c: Source/kmakefile.l Source/y.tab.c cd Source && $(LEX) kmakefile.l Source/function.c: Tool/genfunc ./Tool/genfunc ./Source/Function > $@ || (rm -f $@ ; exit 1) ./Tool/genfunc: ./Tool/genfunc.c $(HOSTCC) -o $@ ./Tool/genfunc.c .c.o: $(CC) $(CFLAGS) -c -o $@ $< install: all mkdir -p $(PREFIX)/bin cp kmake $(PREFIX)/bin/ clean: rm -f kmake $(OBJS) Source/y.tab.c Source/lex.yy.c Source/y.tab.h Tool/genfunc Source/function.c Source/Function/*.o