C++ Can';t使MakeFile c++;使用-lcrypto

C++ Can';t使MakeFile c++;使用-lcrypto,c++,makefile,C++,Makefile,你好。我需要为我的程序编写makefile。我只有ukol2.cpp。当我在终端中编译时,我写: g++-Wall-ukol2.cpp-lcrypto-o prog/程序d 我还有一个模板: CC = gcc CFLAGS = -g LDFLAGS = -lcrypto all: hash stream run: #run your tests here... hash: hash.o $(CC) -o $@ $< $(LDFLAGS) stream: stream.o

你好。我需要为我的程序编写makefile。我只有ukol2.cpp。当我在终端中编译时,我写:

g++-Wall-ukol2.cpp-lcrypto-o prog/程序d

我还有一个模板:

CC = gcc
CFLAGS = -g
LDFLAGS = -lcrypto

all: hash stream
run:
    #run your tests here...
hash: hash.o
    $(CC) -o $@ $< $(LDFLAGS)
stream: stream.o
    $(CC) -o $@ $< $(LDFLAGS)
%.o: %.c
    $(CC) -c -o $@ $< $(CFLAGS)
CC=gcc
CFLAGS=-g
LDFLAGS=-lcrypto
全部:哈希流
运行:
#在这里运行您的测试。。。
hash:hash.o
$(CC)-o$@$<$(LDFLAGS)
stream:stream.o
$(CC)-o$@$<$(LDFLAGS)
%.o:%.c
$(CC)-c-o$@$<$(CFLAGS)
你能帮我用同样的C和LD标志写我自己的makefile吗