makefile 调用其他makefile
来源:互联网 发布:连环call软件 编辑:程序博客网 时间:2024/05/29 18:32
from http://blog.csdn.net/hanchaoman/article/details/5697699
项目1makefile:
LIBDIR = /root
INCDIR = . ./Include
TARGET = x
MAKEFILE = makefile
LIBS = dl pthread rt
TXLIB = aes
#CC = gcc -ggdb
CC = gcc
CPPFLAGS = -MD
# add -D_INTERRUPT to CFLAGS to switch to interrupt mode.
CFLAGS := -O -Wall -D_REENTRANT -fPIC $(addprefix -I, $(INCDIR)) -g
LDFLAGS = -Wl,-Bsymbolic -rdynamic
SOURCE := $(wildcard *.c) $(wildcard *.cpp)
OBJS := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE)))
DEPS := $(patsubst %.o,%.d,$(OBJS))
all : $(TARGET)
clean :
-rm -f ../$(TARGET) $(OBJS) $(DEPS) *~ core*
-include $(DEPS)
$(TARGET) : $(OBJS) $(MAKEFILE)
$(CC) -o ../$(TARGET) $(LDFLAGS) $(OBJS) $(addprefix -l,$(LIBS)) -laes -L/usr/lib/mysql -lmysqlclient -lm -lz -lstdc++
项目2makefile:
TARGET=moni_x
CC=gcc
CFLAGS=-Wall -O -g
SOURCE=$(wildcard *.c)
OBJS=${SOURCE:.c=.o}
all: $(TARGET)
$(TARGET):$(OBJS)
$(CC) $(CFLAGS) $^ -o ../$@
# $(CC) $(CFLAGS) $(OBJS) -o ../$(TARGET)
.PHONY: clean
clean:
rm -rf ../$(TARGET) $(OBJS) *~ core*
SUBDIRS = Clean-with-com4 moni_x
all:
@list='$(SUBDIRS)'; for subdir in $$list; do /
echo "Making all in $$list"; /
(cd $$subdir && make all); /
done;
.PHONY: clean
clean:
@list='$(SUBDIRS)'; for subdir in $$list; do /
echo "Clean in $$subdir"; /
(cd $$subdir && make clean); /
done
- makefile调用其他makefile
- makefile 调用其他makefile
- makefile 调用其他makefile文件
- Makefile详解-引用其他Makefile
- Makefile
- Makefile
- makefile
- makefile
- makefile
- Makefile
- Makefile
- Makefile
- Makefile
- Makefile
- Makefile
- makefile
- Makefile
- makefile
- 卸载Ubuntu
- c++ 模板函数初试
- 栈的习题
- 黑马程序员——Java高新技术(1)
- Servlet
- makefile 调用其他makefile
- 设置ssh免密码登录服务器
- 第17章,进程间通信
- 交通部:高速高铁等公共领域拟实现一卡通
- MySQL Performance: Linux I/O
- C语言小结
- 3D图形渲染管线
- Java:重写equals()和hashCode()
- 解决二货 Android TextView走马灯不能滚动问题