mirror of
https://github.com/sonertari/SSLproxy
synced 2024-11-04 12:00:15 +00:00
3af16b3228
Create function macros for fine* debug logs Fix a few memory leaks when DEBUG_PROXY enabled Add main.mk to MKFS list Put a few function params within DEBUG_PROXY directives Check retval of a snprintf() call Fix segfault with -w/-W options if no ssl proxyspec specified, also fixed in sslsplit develop: https://github.com/droe/sslsplit/issues/271 Various clean-up
59 lines
1.5 KiB
Makefile
59 lines
1.5 KiB
Makefile
PROJECT_ROOT= ../../
|
|
include $(PROJECT_ROOT)main.mk
|
|
|
|
SRCS:= $(wildcard *.t.c)
|
|
OBJS:= $(SRCS:.t.c=.t.o)
|
|
|
|
SRCSRCS:= $(wildcard $(PROJECT_ROOT)$(SRCDIR)/*.c)
|
|
SRCHDRS:= $(wildcard $(PROJECT_ROOT)$(SRCDIR)/*.h)
|
|
SRCSOBJS:= $(SRCSRCS:.c=.o)
|
|
OBJS+= $(filter-out $(PROJECT_ROOT)$(SRCDIR)/main.o,$(SRCSOBJS))
|
|
MKFS:= $(wildcard GNUmakefile $(PROJECT_ROOT)$(SRCDIR)/GNUmakefile $(PROJECT_ROOT)GNUmakefile $(PROJECT_ROOT)main.mk $(PROJECT_ROOT)Mk/*.mk)
|
|
|
|
all: test
|
|
|
|
$(TARGET).test: $(OBJS)
|
|
$(CC) $(LDFLAGS) $(TPKG_LDFLAGS) -o $@ $^ $(LIBS) $(TPKG_LIBS)
|
|
|
|
%.t.o: %.t.c $(SRCHDRS) $(MKFS)
|
|
ifdef CHECK_MISSING
|
|
$(error unit test dependency 'check' not found; \
|
|
install it or point CHECK_BASE to base path)
|
|
endif
|
|
$(CC) -c $(CPPFLAGS) $(TCPPFLAGS) $(CFLAGS) $(TPKG_CFLAGS) -o $@ \
|
|
-x c $<
|
|
|
|
buildtest: TCPPFLAGS+=-D"TEST_ZEROUSR=\"$(shell id -u -n root||echo 0)\""
|
|
buildtest: TCPPFLAGS+=-D"TEST_ZEROGRP=\"$(shell id -g -n root||echo 0)\""
|
|
buildtest: TCPPFLAGS+=-I$(PROJECT_ROOT)$(SRCDIR)
|
|
buildtest: $(TARGET).test
|
|
$(MAKE) -C engine
|
|
$(MAKE) -C pki testreqs
|
|
|
|
test: buildtest
|
|
./$(TARGET).test
|
|
|
|
sudotest: buildtest
|
|
sudo ./$(TARGET).test
|
|
|
|
travis: TCPPFLAGS+=-DTRAVIS
|
|
travis: test
|
|
|
|
clean:
|
|
$(MAKE) -C engine clean
|
|
$(RM) -f $(TARGET).test *.o .*.o *.core *~
|
|
$(RM) -rf *.dSYM
|
|
|
|
ifdef GITDIR
|
|
lint:
|
|
$(CPPCHECK) $(CPPCHECKFLAGS) --force --enable=all --error-exitcode=1 .
|
|
|
|
realclean: clean
|
|
$(MAKE) -C pki clean
|
|
endif
|
|
|
|
FORCE:
|
|
|
|
.PHONY: all config clean buildtest test sudotest travis realclean
|
|
|