2006-05-15 11:41:00 +02: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)
|
2006-05-17 11:54:22 +02:00
|
|
|
@echo '#define EXEC_PATH "$(LIB_DIR)/$(CGI_FILENAME)"' >$(HEADER_FILE)
|
2006-05-15 11:41:00 +02:00
|
|
|
$(CC) -o $(CGI_SUID_FILE) $(SRC_FILE)
|
|
|
|
-rm $(HEADER_FILE)
|
|
|
|
|
|
|
|
|
|
|
|
$(ROOT_SUID_FILE): $(SRC_FILE)
|
2006-05-17 11:54:22 +02:00
|
|
|
@echo '#define EXEC_PATH "$(LIB_DIR)/$(ROOT_SCRIPT_FILENAME)"' >$(HEADER_FILE)
|
2006-05-15 11:41:00 +02:00
|
|
|
$(CC) -o $(ROOT_SUID_FILE) $(SRC_FILE)
|
|
|
|
-rm $(HEADER_FILE)
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f $(CGI_SUID_FILE) $(ROOT_SUID_FILE) $(HEADER_FILE)
|
|
|
|
|