makefile
来自「b树实现源码,linux和unix下运行,速度快,极好用」· 代码 · 共 68 行
TXT
68 行
OSNAME = $(shell uname -s)PlatForm=supportedifeq ($(OSNAME), SunOS)CPlus = CCCPlusFlags = -O2 -w -mt -xarch=v8SYSLIBS=-ldl -lnsl -lsocket -lposix4elseifeq ($(OSNAME), Linux)CPlus = g++CPlusFlags = -g -wSYSLIBS= -rdynamic -lrt -lpthread -lcryptelsePlatForm=notsupportedall: echo "CSQL is not supported on $(OSNAME) platform"endifendifINCL= -I$(CSQL_INSTALL_ROOT)/includeLIBS= -L$(CSQL_INSTALL_ROOT)/lib -lcsqlTARGETS = \ test001 \ test002 \ test004 \ test005 \ test006 \ test007 \ test008 \ test009 \ test010 \ test011 \ test003 ifeq ($(PlatForm), supported)all: $(TARGETS)endiftest001: uniqueindex1.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test002: uniqueindex2.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test003: uniqueindex3.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test004: twoindex1.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test005: twoindex2.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test006: dupindex1.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test007: dupindex2.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test008: compositekeyindex1.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test009: createindexnotexist.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test010: createindexnofld.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)test011: primarynonunique.c $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)clean: rm -f $(TARGETS)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?