[submodule "botm-common"]
path = botm-common
url = ../../botm/common-perl
+[submodule "exec"]
+ path = exec
+ url = ../../botm/exec
--- /dev/null
+Subproject commit e95a720dc218bda573b24d2ba52af79b4be48da9
# make -B TARGET=target_name makefile
endif
+CC =gcc
+CF =-g -Wall
+
CHMOD=/usr/bin/chmod
CP =/usr/bin/cp
MKDIR=/usr/bin/mkdir
RM =/usr/bin/rm
+PERL =/usr/bin/perl
BIN_PATH = /botm/bin/test-post
LIB_PATH = /botm/lib/test-post
sendpost.1.pl
TO_GENERATE=\
-sendpost
+sendpost.pl
+
DIR=\
$(BIN_PATH)\
HIDDEN_DIR=\
$(TMP_PATH)
-SETUID=
+SETUID=\
+sendpost.pl
EXEC=\
+sendpost.pl
+
+PERL_WRAP_EXEC=\
sendpost
+
BIN=\
-$(EXEC)
+$(EXEC)\
+$(PERL_WRAP_EXEC)
LIB=\
botm-common/botm_common.pm
-all: $(BIN)
+all: $(BIN) setuid exec
makefile: makefile.1.mak $(CONFIGFILE)
$(CONFIGURE_CMD) < makefile.1.mak > makefile
$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
$(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)
+$(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt
+ $(PERL) $(CONFIGURE) path=$(BIN_PATH) target=$*.pl exec/settings.txt --in exec/exec.c --out $*.c
+ $(CC) $(CF) -o $@ $*.c
exec: $(EXEC)
$(CHMOD) +x $(EXEC)
+wrap_exec:
+
setuid: $(SETUID)
-# $(CHMOD) u+s,g+s $(SETUID)
-
+ $(CHMOD) u+s,g+s $(SETUID)
+
mktree:
$(MKDIR) -p $(DIR)
install: all cp_bin cp_lib
clean:
- $(RM) -f $(TO_GENERATE)
+ $(RM) -f $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c)
PHONY: all clean install cp_bin cp_lib
# make -B TARGET=target_name makefile\r
endif\r
\r
+###MAKE_CC: CC=gcc\r
+###MAKE_CF: CF=-g -Wall\r
+\r
###MAKE_CHMOD: CHMOD = chmod\r
###MAKE_CP: CP = cp\r
###MAKE_MKDIR: MKDIR = mkdir\r
###MAKE_RM: RM = rm\r
+###MAKE_PERL: PERL = perl\r
\r
###MAKE_BIN_PATH: BIN_PATH = /botm/bin/post\r
###MAKE_LIB_PATH: LIB_PATH = /botm/lib/post\r
sendpost.1.pl\r
\r
TO_GENERATE=\\r
-sendpost\r
+sendpost.pl\r
+\r
\r
DIR=\\r
$(BIN_PATH)\\r
HIDDEN_DIR=\\r
$(TMP_PATH)\r
\r
-SETUID=\r
+SETUID=\\r
+sendpost.pl\r
\r
EXEC=\\r
+sendpost.pl\r
+\r
+PERL_WRAP_EXEC=\\r
sendpost\r
\r
+\r
BIN=\\r
-$(EXEC)\r
+$(EXEC)\\r
+$(PERL_WRAP_EXEC)\r
\r
LIB=\\r
botm-common/botm_common.pm\r
\r
-all: $(BIN)\r
+all: $(BIN) setuid exec\r
\r
makefile: makefile.1.mak $(CONFIGFILE)\r
$(CONFIGURE_CMD) < makefile.1.mak > makefile\r
$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)\r
$(CONFIGURE_CMD) --in $(GENERATE_FROM) --out $(TO_GENERATE)\r
\r
+$(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt\r
+ $(PERL) $(CONFIGURE) path=$(BIN_PATH) target=$*.pl exec/settings.txt --in exec/exec.c --out $*.c\r
+ $(CC) $(CF) -o $@ $*.c\r
\r
exec: $(EXEC)\r
$(CHMOD) +x $(EXEC)\r
\r
+wrap_exec: \r
+\r
setuid: $(SETUID)\r
-# $(CHMOD) u+s,g+s $(SETUID)\r
- \r
+ $(CHMOD) u+s,g+s $(SETUID)\r
+\r
\r
mktree:\r
$(MKDIR) -p $(DIR)\r
install: all cp_bin cp_lib\r
\r
clean:\r
- $(RM) -f $(TO_GENERATE)\r
+ $(RM) -f $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c)\r
\r
PHONY: all clean install cp_bin cp_lib\r
\r
perl: /usr/bin/perl
rm: /usr/bin/rm
wget: /usr/bin/wget
+
+CC: gcc
+CF: -g -Wall
\ No newline at end of file
perl: /usr/bin/perl
rm: /usr/bin/rm
wget: /usr/bin/wget
+
+CC: gcc
+CF: -g -Wall
\ No newline at end of file
MAKE_CHMOD = CHMOD=$chmod
MAKE_CP = CP =$cp
MAKE_MKDIR = MKDIR=$mkdir
+MAKE_PERL = PERL =$perl
MAKE_RM = RM =$rm
+MAKE_CC = CC =$CC
+MAKE_CF = CF =$CF
+
MAKE_BIN_PATH = BIN_PATH = $bin_path
MAKE_LIB_PATH = LIB_PATH = $lib_path
MAKE_TMP_PATH = TMP_PATH = $tmp_path