-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (34 loc) · 1.01 KB
/
Makefile
File metadata and controls
43 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -O2 -Wno-deprecated-declarations
LDFLAGS = -lcrypto
# OpenSSL paths for macOS Homebrew
OPENSSL_PREFIX = $(shell brew --prefix openssl@3 2>/dev/null)
ifneq ($(OPENSSL_PREFIX),)
CFLAGS += -I$(OPENSSL_PREFIX)/include
LDFLAGS += -L$(OPENSSL_PREFIX)/lib
endif
TARGET = picocert_tests
SOURCES = picocert_tests.c
HEADERS = picocert.h
.PHONY: all clean test
all: $(TARGET)
$(TARGET): $(SOURCES) $(HEADERS)
$(CC) $(CFLAGS) -o $(TARGET) $(SOURCES) $(LDFLAGS)
test: $(TARGET)
./$(TARGET)
example: $(TARGET)
./$(TARGET)
clean:
rm -f $(TARGET)
help:
@echo "Available targets:"
@echo " all - Build the test executable"
@echo " test - Build and run the tests"
@echo " clean - Remove built files"
@echo " help - Show this help message"
@echo ""
@echo "Requirements:"
@echo " - OpenSSL development libraries"
@echo " - On macOS: brew install openssl@3"
@echo " - On Ubuntu/Debian: sudo apt-get install libssl-dev"
@echo " - GCC compiler with C99 support"