⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 完全免费的邮件发送程序。delphi 6.0
💻
字号:
# -*- makefile -*-
# Makefile for Unix with g++ compiler

CC=g++
# if you use egcs-2.90.* version of GCC please add option -fno-exceptions 
# to reduce code size and increase performance

# Debug version
#CFLAGS = -c -Wall -O0 -g -DDEBUG_LEVEL=DEBUG_TRACE

# Optimized version
CFLAGS = -c -Wall -O6 -g -DDEBUG_LEVEL=DEBUG_CHECK

# Optimized version with switched off asserts
#CFLAGS = -c -Wall -O6 -g -DNDEBUG

LFLAGS=-g
AR=ar
ARFLAGS=-cru 

EXAMPLES=guess testtree testtext testspat testperf dumpmem testnew 
STL_EXAMPLES=testmap stltest

INSTALL_LIB_PATH=/usr/local/post/lib
INSTALL_INC_PATH=/usr/local/post/inc

HEADERS=stdtp.h file.h storage.h classinfo.h object.h
OBJS=file.o storage.o classinfo.o avltree.o rtree.o ttree.o array.o hashtab.o textobj.o 

all: libstorage.a postnew.o $(EXAMPLES)

file.o: file.cxx $(HEADERS)
	$(CC) $(CFLAGS) file.cxx

storage.o: storage.cxx $(HEADERS)
	$(CC) $(CFLAGS) storage.cxx

classinfo.o: classinfo.cxx $(HEADERS)
	$(CC) $(CFLAGS) classinfo.cxx

avltree.o: avltree.cxx avltree.h $(HEADERS)
	$(CC) $(CFLAGS) avltree.cxx

rtree.o: rtree.cxx rtree.h dnmarr.h $(HEADERS)
	$(CC) $(CFLAGS) rtree.cxx

ttree.o: ttree.cxx ttree.h dnmarr.h $(HEADERS)
	$(CC) $(CFLAGS) ttree.cxx

array.o: array.cxx array.h $(HEADERS)
	$(CC) $(CFLAGS) array.cxx

hashtab.o: hashtab.cxx hashtab.h $(HEADERS)
	$(CC) $(CFLAGS) hashtab.cxx

textobj.o: textobj.cxx textobj.h $(HEADERS)
	$(CC) $(CFLAGS) textobj.cxx

postnew.o: postnew.cxx $(HEADERS)
	$(CC) $(CFLAGS) postnew.cxx

libstorage.a: $(OBJS)
	$(AR) $(ARFLAGS) libstorage.a $(OBJS)

install: libstorage.a
	mkdir -p $(INSTALL_LIB_PATH)
	cp libstorage.a $(INSTALL_LIB_PATH)
	mkdir -p $(INSTALL_INC_PATH)
	cp *.h $(INSTALL_INC_PATH)
#
# Examples
#

guess.o: guess.cxx $(HEADERS)
	$(CC) $(CFLAGS) guess.cxx

testtext.o: testtext.cxx textobj.h array.h $(HEADERS)
	$(CC) $(CFLAGS) testtext.cxx

testtree.o: testtree.cxx avltree.h hashtab.h $(HEADERS)
	$(CC) $(CFLAGS) testtree.cxx

testspat.o: testspat.cxx rtree.h dnmarr.h hashtab.h $(HEADERS)
	$(CC) $(CFLAGS) testspat.cxx

testperf.o: testperf.cxx ttree.h dnmarr.h $(HEADERS)
	$(CC) $(CFLAGS) testperf.cxx

testrans.o: testrans.cxx avltree.h $(HEADERS)
	$(CC) $(CFLAGS) testrans.cxx

dumpmem.o: dumpmem.cxx $(HEADERS)
	$(CC) $(CFLAGS) dumpmem.cxx

testnew.o: testnew.cxx $(HEADERS)
	$(CC) $(CFLAGS) testnew.cxx


guess: guess.o comptime.cxx libstorage.a
	$(CC) $(LFLAGS) -o guess guess.o comptime.cxx libstorage.a

testtext: testtext.o comptime.cxx libstorage.a
	$(CC) $(LFLAGS) -o testtext testtext.o comptime.cxx libstorage.a

testtree: testtree.o comptime.cxx libstorage.a
	$(CC) $(LFLAGS) -o testtree testtree.o comptime.cxx libstorage.a

testspat: testspat.o comptime.cxx libstorage.a
	$(CC) $(LFLAGS) -o testspat testspat.o comptime.cxx libstorage.a

testperf: testperf.o libstorage.a
	$(CC) $(LFLAGS) -o testperf testperf.o libstorage.a

testrans: testrans.o comptime.cxx libstorage.a
	$(CC) $(LFLAGS) -o testrans testrans.o comptime.cxx libstorage.a

dumpmem: dumpmem.o libstorage.a
	$(CC) $(LFLAGS) -o dumpmem dumpmem.o libstorage.a

testnew: testnew.o postnew.o
	$(CC) $(LFLAGS) -o testnew testnew.o postnew.o libstorage.a

#
# Service targets
#

cleanobj:
	rm -f *.o core *~ $(EXAMPLES) $(STL_EXAMPLES) testrans

cleandbs: 
	rm -f *.odb *.log *.tmp

clean: cleanobj cleandbs

cleanall: clean
	rm -f *.a


tgz:	cleanall
	cd ..; tar cvzf post.tgz post

copytgz: tgz
	mcopy -o ../post.tgz a:


STL_INCLUDES=/usr/local/include

stltest.o: stltest.cxx post_stl.h $(HEADERS)
	$(CC) $(CFLAGS) -I$(STL_INCLUDES) -DREDEFINE_DEFAULT_ALLOCATOR -DNO_NAMESPACES -DUSE_STD_ALLOCATORS -DREDEFINE_STRING stltest.cxx

stltest: stltest.o libstorage.a 
	$(CC) $(LFLAGS) -o stltest stltest.o libstorage.a 

testmap.o: testmap.cxx post_stl.h $(HEADERS)
	$(CC) $(CFLAGS) -I$(STL_INCLUDES) -DREDEFINE_DEFAULT_ALLOCATOR -DNO_NAMESPACES -DUSE_STD_ALLOCATORS -DREDEFINE_STRING testmap.cxx

testmap: testmap.o libstorage.a 
	$(CC) $(LFLAGS) -o testmap testmap.o libstorage.a 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -