cryptonas-archive/v0.3/bin-perl-old/Makefile

38 lines
974 B
Makefile
Raw Permalink Normal View History

2006-12-15 14:48:42 +01:00
# Makefile to compile the binary suid-wrapper for cryptobox
#
# LIB_DIR should be defined in the higher level Makefile
#
HEADER_FILE = cryptobox_wrapper.h
SRC_FILE = cryptobox_wrapper.c
CGI_SUID_FILE = cryptobox_cgi_wrapper
ROOT_SUID_FILE = cryptobox_root_wrapper
CGI_FILENAME = cryptobox.pl
ROOT_SCRIPT_FILENAME = cbox-root-actions.sh
# fall back to default, if not overwritten
LIB_DIR = /usr/local/lib/cryptobox
# _always_ recompile (in case of a changed LIB_DIR)
.PHONY: build clean $(CGI_SUID_FILE) $(ROOT_SUID_FILE)
build: $(CGI_SUID_FILE) $(ROOT_SUID_FILE)
$(CGI_SUID_FILE): $(SRC_FILE)
@echo '#define EXEC_PATH "$(LIB_DIR)/$(CGI_FILENAME)"' >$(HEADER_FILE)
$(CC) -o $(CGI_SUID_FILE) $(SRC_FILE)
-rm $(HEADER_FILE)
$(ROOT_SUID_FILE): $(SRC_FILE)
@echo '#define EXEC_PATH "$(LIB_DIR)/$(ROOT_SCRIPT_FILENAME)"' >$(HEADER_FILE)
$(CC) -o $(ROOT_SUID_FILE) $(SRC_FILE)
-rm $(HEADER_FILE)
clean:
-rm -f $(CGI_SUID_FILE) $(ROOT_SUID_FILE) $(HEADER_FILE)