# when want to change target run this first:
# make -B TARGET=target_name makefile
endif
+PERL = perl
CC =gcc
CF =-g -Wall
CONFIGFILE = settings-$(TARGET).txt settings.txt
# The configuration tool
-# http://bicyclesonthemoon.info/git/botm-config
-CONFIGURE = /botm/bin/config/configure.pl
-CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE)
+CONFIGURE_CMD = $(PERL) ./configure.pl $(CONFIGFILE)
# keep these 2 lists in the same order!:
GENERATE_FROM=\
all: $(BIN) setuid exec
-makefile: makefile.1.mak $(CONFIGFILE)
+makefile: makefile.1.mak $(CONFIGFILE) configure.pl
$(CONFIGURE_CMD) < makefile.1.mak > makefile
+
+configure.pl: $(CONFIGFILE) config/configure.1.pl
+ $(PERL) config/configure.1.pl target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl
-$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)
+$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl
$(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
+$(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt configure.pl
+ $(PERL) configure.pl path=$(BIN_PATH) target=$*.pl exec/settings.txt --in exec/exec.c --out $*.c
$(CC) $(CF) -o $@ $*.c
exec: $(EXEC)
install: all cp_bin cp_lib
clean:
- $(RM) -f $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c)
+ $(RM) -f configure.pl $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c)
PHONY: all clean install cp_bin cp_lib
# when want to change target run this first:\r
# make -B TARGET=target_name makefile\r
endif\r
+PERL = perl\r
\r
###MAKE_CC: CC=gcc\r
###MAKE_CF: CF=-g -Wall\r
CONFIGFILE = settings-$(TARGET).txt settings.txt\r
\r
# The configuration tool\r
-# http://bicyclesonthemoon.info/git/botm-config \r
-CONFIGURE = /botm/bin/config/configure.pl ###MAKE_CONFIGURE:\r
-CONFIGURE_CMD = $(PERL) $(CONFIGURE) $(CONFIGFILE)\r
+CONFIGURE_CMD = $(PERL) ./configure.pl $(CONFIGFILE)\r
\r
# keep these 2 lists in the same order!:\r
GENERATE_FROM=\\r
\r
all: $(BIN) setuid exec\r
\r
-makefile: makefile.1.mak $(CONFIGFILE)\r
+makefile: makefile.1.mak $(CONFIGFILE) configure.pl\r
$(CONFIGURE_CMD) < makefile.1.mak > makefile\r
+ \r
+configure.pl: $(CONFIGFILE) config/configure.1.pl\r
+ $(PERL) config/configure.1.pl target=direct settings-$(TARGET).txt config/settings.txt --in config/configure.1.pl --out configure.pl\r
\r
\r
-$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE)\r
+$(TO_GENERATE): $(GENERATE_FROM) $(CONFIGFILE) configure.pl\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
+$(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt configure.pl\r
+ $(PERL) configure.pl path=$(BIN_PATH) target=$*.pl exec/settings.txt --in exec/exec.c --out $*.c\r
$(CC) $(CF) -o $@ $*.c\r
\r
exec: $(EXEC)\r
install: all cp_bin cp_lib\r
\r
clean:\r
- $(RM) -f $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c)\r
+ $(RM) -f configure.pl $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c)\r
\r
PHONY: all clean install cp_bin cp_lib\r
\r