两个Makefile规则
一,
#LIB
all:dir $(TARGET) mv
dir:
mkdir -p build
$(TARGET):$(OBJS)
$(CC) $(CFLAGS) $(H_USER_DEFS) $(H_INCLUDE_PATH) $(H_LIB_PATH) $(H_USER_LIBRARIES) $? -o $@
.SUFFIXES:.o.cpp www.zzzyk.com
.cpp.o:
$(CC) ${CFLAGS} $(H_USER_DEFS) $(H_INCLUDE_PATH) $(H_LIB_PATH) $(H_USER_LIBRARIES) -c $<
mv:
mv *.o ./build
mv $(TARGET) ./build
#LIB
all:dir $(OBJS) $(TARGET)
dir:
mkdir -p build
$(OBJS):%.o:%.cpp
$(CC) $(CFLAGS) $(H_USER_DEFS) $(H_INCLUDE_PATH) $(H_LIB_PATH) $(H_USER_LIBRARIES) -c $? -o $@
$(TARGET):$(OBJS)
$(CC) $(CFLAGS) $(H_USER_DEFS) $(H_INCLUDE_PATH) $(H_LIB_PATH) $(H_USER_LIBRARIES) $? -o $@
补充:综合编程 , 其他综合 ,