forked from anomalizer/ngx_aws_auth
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (17 loc) · 768 Bytes
/
Makefile
File metadata and controls
27 lines (17 loc) · 768 Bytes
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
CC=gcc
CFLAGS=-g -I${NGX_PATH}/src/os/unix -I${NGX_PATH}/src/core -I${NGX_PATH}/src/http -I${NGX_PATH}/src/http/modules -I${NGX_PATH}/src/event -I${NGX_PATH}/objs/ -I.
all:
%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS)
.PHONY: all clean test nginx
NGX_OBJS := $(shell find ${NGX_PATH}/objs -name \*.o)
nginx:
cd ${NGX_PATH} && rm -rf ${NGX_PATH}/objs/src/core/nginx.o && make
test: | nginx
strip -N main -o ${NGX_PATH}/objs/src/core/nginx_without_main.o ${NGX_PATH}/objs/src/core/nginx.o
mv ${NGX_PATH}/objs/src/core/nginx_without_main.o ${NGX_PATH}/objs/src/core/nginx.o
$(CC) test_suite.c $(CFLAGS) -o test_suite -lcmocka ${NGX_OBJS} -ldl -lpthread -lcrypt -lssl -lpcre -lcrypto -lz $<
./test_suite
clean:
rm -f *.o test_suite
# vim: ft=make ts=8 sw=8 noet