Example of Makefile
来源:互联网 发布:网络传播与策划 刘芸 编辑:程序博客网 时间:2024/04/24 20:19
Linux下多线程程序编译makefile文件
在Linux下,编译一个多线程的程序命令为:
gcc -lpthread -o file file.c
在Linux下,用交叉编译器编译一个在uclinux下运行的多线程程序,makefile文件如下:
CFLAGS = -Wall -Os -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED
LDFLAGS =-Wl,-elf2flt
LOCAL_LIBS = /usr/local/arm-elf/lib/libpthread.a
CC = arm-elf-gcc
LD = arm-elf-gcc
TARGT = test
OBJ = $(TARGT).o
SRC = $(TARGT).c
all: $(TARGT)
%.o:%.c
$(CC) $(CFLAGS) -c ___FCKpd___0lt; -o $@
$(TARGT) :$(OBJ) $(LOCAL_LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LOCAL_LIBS) $(LDLIBS)
clean:
-rm -f $(EXEC) *.elf *.gdb *.o
- Example of Makefile
- Makefile example
- example of Makefile to compile a c source file
- A simple makefile example
- A Makefile example
- Makefile and Example
- Android Makefile example
- Linux Makefile example
- Example of email Phishing
- A example of Log4c
- Basic Example Of RTimer
- Example of Seriazable List
- A example of pointer
- Another example of Expect
- example of creating table
- example of QGridLayout
- example of while [ ]
- Basic Example Of RTimer
- RSH远程Shell命令
- 颜色选择框
- IBM T30 开机困难问题的简单办法
- zoj 1025 Wooden Sticks
- VSS(2005)中如何强行签入文件
- Example of Makefile
- Backtrack 4: Crack WPA2
- 如何阅读linux内核源码
- zoj 1027 Human Gene Functions
- Web dynpro的SELECT-OPTIONS做成方法
- 构建form,保护隐私数据传递给本身,并且通过pre_init改变theme
- 内存管理-page初始化,分配与回收
- Larbin learning (1)——How to compile and use larbin
- 修改host访问Google Chrome官方扩展页