makefile
上传用户:lengbin
上传日期:2010-03-31
资源大小:121k
文件大小:4k
- #-----------------------------------------------------------------------
- # File : makefile
- # Contents: build apriori program
- # Author : Christian Borgelt
- # History : ??.??.1995 file created
- # 13.10.1997 macro ADDFLAGS added
- # 07.12.1997 minor improvements
- # 04.01.1998 table file scanner management added
- # 11.11.1999 vector operations module added
- # 04.11.2000 modules vecops, symtab, and tfscan made external
- # 18.11.2001 module tract (transaction management) added
- # 12.12.2003 preprocessor definition ARCH64 added
- #-----------------------------------------------------------------------
- CC = gcc
- CFBASE = -ansi -Wall -pedantic -I$(UTILDIR) $(ADDFLAGS)
- CFLAGS = $(CFBASE) -DNDEBUG -O3
- # CFLAGS = $(CFBASE) -DNDEBUG -O3 -DBENCH
- # CFLAGS = $(CFBASE) -DNDEBUG -O3 -DARCH64
- # CFLAGS = $(CFBASE) -g
- # CFLAGS = $(CFBASE) -g -DARCH64
- # CFLAGS = $(CFBASE) -g -DSTORAGE $(ADDINC)
- LDFLAGS =
- LIBS = -lm
- # ADDINC = -I../../misc/src
- # ADDOBJ = storage.o
- UTILDIR = ../../util/src
- HDRS = $(UTILDIR)/vecops.h $(UTILDIR)/symtab.h $(UTILDIR)/tfscan.h
- $(UTILDIR)/scan.h tract.h istree.h
- OBJS = $(UTILDIR)/vecops.o $(UTILDIR)/nimap.o $(UTILDIR)/tfscan.o
- $(UTILDIR)/scform.o tract.o istree.o apriori.o $(ADDOBJ)
- #-----------------------------------------------------------------------
- # Build Program
- #-----------------------------------------------------------------------
- all: apriori
- apriori: $(OBJS) makefile
- $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
- #-----------------------------------------------------------------------
- # Main Program
- #-----------------------------------------------------------------------
- apriori.o: tract.h istree.h $(UTILDIR)/symtab.h
- apriori.o: apriori.c makefile
- $(CC) $(CFLAGS) -c apriori.c -o $@
- #-----------------------------------------------------------------------
- # Item and Transaction Management
- #-----------------------------------------------------------------------
- tract.o: tract.h $(UTILDIR)/symtab.h
- tract.o: tract.c makefile
- $(CC) $(CFLAGS) -c tract.c -o $@
- #-----------------------------------------------------------------------
- # Frequent Item Set Tree Management
- #-----------------------------------------------------------------------
- istree.o: istree.h tract.h
- istree.o: istree.c makefile
- $(CC) $(CFLAGS) -c istree.c -o $@
- #-----------------------------------------------------------------------
- # External Modules
- #-----------------------------------------------------------------------
- $(UTILDIR)/vecops.o:
- cd $(UTILDIR); $(MAKE) vecops.o ADDFLAGS=$(ADDFLAGS)
- $(UTILDIR)/nimap.o:
- cd $(UTILDIR); $(MAKE) nimap.o ADDFLAGS=$(ADDFLAGS)
- $(UTILDIR)/tfscan.o:
- cd $(UTILDIR); $(MAKE) tfscan.o ADDFLAGS=$(ADDFLAGS)
- $(UTILDIR)/scform.o:
- cd $(UTILDIR); $(MAKE) scform.o ADDFLAGS=$(ADDFLAGS)
- #-----------------------------------------------------------------------
- # Storage Debugging
- #-----------------------------------------------------------------------
- storage.o: ../../misc/src/storage.h
- storage.o: ../../misc/src/storage.c
- $(CC) $(CFLAGS) -c ../../misc/src/storage.c -o $@
- #-----------------------------------------------------------------------
- # Install
- #-----------------------------------------------------------------------
- install:
- cp apriori $(HOME)/bin
- #-----------------------------------------------------------------------
- # Clean up
- #-----------------------------------------------------------------------
- clean:
- rm -f *.o *~ *.flc core apriori
- cd $(UTILDIR); $(MAKE) clean
- localclean:
- rm -f *.o *~ *.flc core apriori