Linux系统下多线程程序编译makefile文件

;在Linux下,编译一个多线程的程序命令为: gcc -lpthread -o file file.c 在Linux下,用交叉编译器编译一个在uclinux下运行的多线程程序,makefile文件如下: CFLAGS = -Wall -Os -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBEDLDFLAGS =-Wl,-elf2fltLOCAL_LIBS = /usr/local/arm-elf/lib/libpthread.aCC = arm-elf-gccLD = arm-elf-gccTARGT = testOBJ = $(TARGT).oSRC = https://www.rkxy.com.cn/dnjc/$(TARGT).call: $(TARGT)%.o:%.c$(CC) $(CFLAGS) -c $< -o $@$(TARGT) :$(OBJ) $(LOCAL_LIBS)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LOCAL_LIBS) $(LDLIBS)clean:-rm -f $(EXEC) *.elf *.gdb *.o

    推荐阅读