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
阅读(802) | 评论(0) | 转发(0) |