Chinaunix首页 | 论坛 | 博客
  • 博客访问: 131661
  • 博文数量: 38
  • 博客积分: 2050
  • 博客等级: 大尉
  • 技术积分: 471
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-19 15:49
文章分类

全部博文(38)

文章存档

2009年(1)

2008年(37)

我的朋友

分类: LINUX

2008-06-17 16:37:24

BUILD_TARGET=x86
CC = g++

INCLUDES = -I../DiscMgr \
    -I../mytest \
    -I../dvdfs/include \
    -I.

CFLAGS += $(INCLUDES) -g -Wall

LDFLAGS = -L../dvdfs/lib -L../mytest -lmtcore -lstdc++ -lpthread -ldvdfs

target = hdcass_mt
dep_files = hdcasstc.o testMain.o

all:$(target)

%.o : %.cpp
    $(CC) $(CFLAGS) -c $< -o $@

$(target) : $(dep_files)
    $(CC) $(LDFLAGS) $(dep_files) ../DiscMgr/disc_mgr.o -o $(target)

clean:
    rm -rf *.o $(target)
==========

CROSS_PREFIX=
BUILD_TARGET=x86

CC = $(CROSS_PREFIX)gcc

SUBSYS_NAME = dvdfs

LMP_BASE_PATH = $(PWD)/../../..
OUT_BASE_PATH = $(LMP_BASE_PATH)/build/$(BUILD_TARGET)/lib
DVDFS_BASE = $(LMP_BASE_PATH)/dvdfs

INCLUDES = -I$(LMP_BASE_PATH)/include \
    -I$(DVDFS_BASE)/include \
    -I$(DVDFS_BASE)/include/vfs \
    -I$(DVDFS_BASE)/include/vfs/common \
    -I$(DVDFS_BASE)/include/vfs/udf \
    -I$(DVDFS_BASE)/test/include

dep_files = ${ls *.c | grep -v tc_api}

src_files = tc_api.c open01.c open02.c    open03.c open04.c

tc_api:
    $(CC)  -g -Wall -o $@ ${src_files} -I${INCLUDES} -L$(OUT_BASE_PATH) -l $(SUBSYS_NAME)

clean:
    rm -rf *.o tc_api


=======
CROSS_PREFIX=
BUILD_TARGET=x86

CC = $(CROSS_PREFIX)gcc

SUBSYS_NAME = dvdfs

LMP_BASE_PATH = $(PWD)/../../..
OUT_BASE_PATH = $(LMP_BASE_PATH)/build/$(BUILD_TARGET)/lib
DVDFS_BASE = $(LMP_BASE_PATH)/dvdfs

INCLUDES = -I$(LMP_BASE_PATH)/include \
    -I$(DVDFS_BASE)/include \
    -I$(DVDFS_BASE)/include/vfs \
    -I$(DVDFS_BASE)/include/vfs/common \
    -I$(DVDFS_BASE)/include/vfs/udf \
    -I$(DVDFS_BASE)/test/include

CFLAGS += $(INCLUDES) -L$(OUT_BASE_PATH) -l $(SUBSYS_NAME) -g -Wall

#dep_files = `ls *.c | grep -v tc_api`
dep_files = open01.c open02.c open03.c open04.c

target = tc_api
all: ${target}
   
${target}:${dep_files}

clean:
    rm -rf *.o tc_api

阅读(828) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~