当前位置: 技术问答>linux和unix
makefile问题???
来源: 互联网 发布时间:2017-04-06
本文导语: SRCS = $(wildcard *.c) OBJS = $(SRCS:.c = .o) CC = gcc INCLUDES = -I/usr/include/mysql LIBS = -L/usr/lib -lmysqlclient -lpthread -lm -lrt -ldl CCFLAGS = -g -Wall -O0 my_app : $(OBJS) $(CC) $^ -o $@ $(INCLUDES) $(LIBS) %.o:%.c $(CC) -c $
SRCS = $(wildcard *.c)
OBJS = $(SRCS:.c = .o)
CC = gcc
INCLUDES = -I/usr/include/mysql
LIBS = -L/usr/lib -lmysqlclient -lpthread -lm -lrt -ldl
CCFLAGS = -g -Wall -O0
my_app : $(OBJS)
$(CC) $^ -o $@ $(INCLUDES) $(LIBS)
%.o:%.c
$(CC) -c $