分类: 数据库开发技术
2015-03-22 15:49:00
#
# Makefile
# OS : Linux, QNX, SunOS, HPUX, CygWin
# Tool : gcc or native complier
#
# Copyright (c) 2001-2014 McObject LLC.
#
#
# root directory of eXtremeDB installation
MCO_ROOT ?= /mnt/hgfs/ShareFolder/Sile/No.2/eXtremeDB
MCO_INCLUDE = $(MCO_ROOT)/include
MCO_LIB = -lmcolib -lmcomem -lmcovtmem -lmconet -lmcosmp -lmcomem -lmcostrerror -lmcoslnx -lmcomipc -lmcotmvcc -lmcolib -lmcomem -lmcouwrt -lmcolicense -lpthread -lm -ldl -lrt
MCO_DEFINE = -MMD -D_GNU_SOURCE -D_LINUX -D_SMP -D_Ix86 -DMCO_PLATFORM_X64 -DMCO_LARGE_DATABASE_SUPPORT
MCO_TARGET = multi-process
MCO_CFG = -O2 -Wall -m64
multi-process : CompMCO main.o simpledb.o
gcc -O2 -MMD -D_GNU_SOURCE -m64 -L$(MCO_ROOT)/target/bin obj/db/simpledb.o obj/main.o $(MCO_ROOT)/samples/native/common/common.o $(MCO_ROOT)/samples/native/common/initos.o $(MCO_LIB) -o $(MCO_ROOT)/target/bin/$(MCO_TARGET)
simpledb.o : ./obj/db/simpledb.c ./obj/db/simpledb.h
gcc $(MCO_CFG) $(MCO_DEFINE) -I$(MCO_INCLUDE) -I$(MCO_INCLUDE)/ha -I$(MCO_INCLUDE)/ws -I$(MCO_ROOT)/samples/native/common -Iobj/db/ -I$(MCO_INCLUDE)/sql -I$(MCO_INCLUDE)/sql/odbc -c obj/db/simpledb.c -o obj/db/simpledb.o
main.o : main.c
gcc $(MCO_CFG) $(MCO_DEFINE) -I$(MCO_INCLUDE) -I$(MCO_INCLUDE)/ha -I$(MCO_INCLUDE)/ws -I$(MCO_ROOT)/samples/native/common -Iobj/db/ -I$(MCO_INCLUDE)/sql -I$(MCO_INCLUDE)/sql/odbc -c main.c -o obj/main.o
CompMCO:
mkdir -p ./obj/db/
$(MCO_ROOT)/host/bin/mcocomp -x64 -Pobj/db/ schema.mco
clean :
rm $(MCO_TARGET) simpledb.o main.o