~aritra1911/openssl_madness

deef16f4ec18fde760c7e79aec5eaf18b81168a7 — Aritra Sarkar 2 years ago 1e1dac6
Prepare for migration to OpenSSL 3.0
1 files changed, 15 insertions(+), 5 deletions(-)

M Makefile
M Makefile => Makefile +15 -5
@@ 1,14 1,24 @@
CFLAGS = -Wall -Wextra -pedantic -std=c99
LIBS = -lcrypto

ifdef OPENSSLDIR
	IDIR = -I$(OPENSSLDIR)/include
	LDIR = -L$(OPENSSLDIR)/lib
endif

ifneq ($(strip $(DEBUG)),)
	CFLAGS += -g -O0
endif

.PHONY: all clean

all: madness

madness: madness.o
	$(CC) $^ -o $@ $(LIBS)
	$(CC) $(LIBS) $(LDIR) -o $@ $^

madness.o: madness.c
	$(CC) $(CFLAGS) -c $^ -o $@

debug: madness.c
	$(CC) $(CFLAGS) -g $^ -o madness $(LIBS)
	$(CC) $(CFLAGS) $(IDIR) -c -o $@ $^

clean:
	$(RM) *.o madness