cryptonas-branches/pythonrewrite/bin-perl-old/Makefile
lars e80b8874ff implemented root actions for plugins
finished network and date plugins
renamed old 'bin' direcory
2006-09-13 10:38:05 +00:00

37 lines
974 B
Makefile

# 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)