当前位置: 技术问答>linux和unix
makefile出现gcc:command not found问题
来源: 互联网 发布时间:2016-08-15
本文导语: 大家帮我看一下是怎么回事? OPTS = -Wall -Werror PATH = /usr/local/mysql INCLUDE = $(PATH)/include/mysql LIB = $(PATH)/lib/mysql all: server client .PHONY: all server: server.o operate.o @gcc $^ -o $@ $(LIB)/libmysqlclient.a -lz cl...
大家帮我看一下是怎么回事?
OPTS = -Wall -Werror
PATH = /usr/local/mysql
INCLUDE = $(PATH)/include/mysql
LIB = $(PATH)/lib/mysql
all: server client
.PHONY: all
server: server.o operate.o
@gcc $^ -o $@ $(LIB)/libmysqlclient.a -lz
client: client.o operate.o
@gcc $^ -o $@ $(LIB)/libmysqlclient.a -lz
server.o: server.c operate.h exception.h
@gcc $(OPTS) -c $
OPTS = -Wall -Werror
PATH = /usr/local/mysql
INCLUDE = $(PATH)/include/mysql
LIB = $(PATH)/lib/mysql
all: server client
.PHONY: all
server: server.o operate.o
@gcc $^ -o $@ $(LIB)/libmysqlclient.a -lz
client: client.o operate.o
@gcc $^ -o $@ $(LIB)/libmysqlclient.a -lz
server.o: server.c operate.h exception.h
@gcc $(OPTS) -c $