Makefile增加include path與指定Lib

openssl的.h安裝在/usr/local/ssl/include/openssl下 Lib的 libcrypto.a在/usr/local/ssl/lib下 不知道 Makefile該怎麼去增加這2個的PATH去找!! g.o這個物件檔需要用到openssl這2個東西!! 謝謝大大們的解答 Makefile如下: CROSS = arm-linux- CC = $(CROSS)gcc CXX = $(CROSS)g OBJDUMP = $(CROSS)objdump INCLUDE = ../include INCLUDESYS... 顯示更多 openssl的.h安裝在/usr/local/ssl/include/openssl下
Lib的 libcrypto.a在/usr/local/ssl/lib下
不知道 Makefile該怎麼去增加這2個的PATH去找!!
g.o這個物件檔需要用到openssl這2個東西!!
謝謝大大們的解答

Makefile如下:
CROSS = arm-linux-
CC = $(CROSS)gcc
CXX = $(CROSS)g
OBJDUMP = $(CROSS)objdump
INCLUDE = ../include
INCLUDESYS =/usr/local/arm/hybus-arm-linux-R1.1/arm-linux/include
CFLAGS = -g -O2 -DCONFIG_ISCSI_DEBUG

CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -fno-common -Wno-trigraphs -I$(INCLUDE) -D_GNU_SOURCE
CFLAGS = -static

OBJS = a.o b.o c.o d.o e.o f.o

abcd: g.o $(OBJS)
$(CC) $(CFLAGS) g.o $(OBJS) -lpthread -o abcd

d.o: d.c $(INCLUDE)/d.h
e.o: e.c $(INCLUDE)/e.h $(INCLUDE)/d.h md5.c
osd.o: osd.c $(INCLUDE)/osd.h $(INCLUDE)/device.h $(INCLUDE)/d.h $(INCLUDE)/c.h
c.o: c.c $(INCLUDE)/c.h $(INCLUDE)/d.h
a.o:a.c $(INCLUDE)/c.h $(INCLUDE)/d.h $(INCLUDE)/b.h $(INCLUDE)/device.h
b.o: target.c $(INCLUDE)/c.h $(INCLUDE)/d.h $(INCLUDE)/b.h $(INCLUDE)/e.h
f.o: f.c $(INCLUDE)/f.h

clean:
rm -f *.o abcd
3 個解答 3