Index: trunk/scconfig/Makefile =================================================================== --- trunk/scconfig/Makefile (revision 353) +++ trunk/scconfig/Makefile (revision 354) @@ -75,12 +75,18 @@ CFLAGS = $(USER_CFLAGS) $(DEFAULT_CFLAGS) $(SCRIPT_CFLAGS) $(PARSER_CFLAGS) $(GENERATOR_CFLAGS) $(TMPASM_CFLAGS) $(C99_CFLAGS) $(PARSGEN_CFLAGS) $(MATH_CFLAGS) $(SOCKET_CFLAGS) $(USERPASS_CFLAGS) $(GUI_CFLAGS) $(TTY_CFLAGS) $(SUL_CFLAGS) $(POSIX_CFLAGS) $(MENULIB_CFLAGS) -I$(SRC)/default LDFLAGS = $(USER_LDFLAGS) $(DEFAULT_LDFLAGS) $(SCRIPT_LDFLAGS) $(PARSER_LDFLAGS) $(GENERATOR_LDFLAGS) $(TMPASM_LDFLAGS) $(C99_LDFLAGS) $(PARSGEN_LDFLAGS) $(MATH_LDFLAGS) $(SOCKET_LDFLAGS) $(USERPASS_LDFLAGS) $(GUI_LDFLAGS) $(TTY_LDFLAGS) $(SUL_LDFLAGS) $(POSIX_LDFLAGS) $(MENULIB_LDFLAGS) -configure: $(OBJS) $(DEFAULT_MAIN_OBJS) +configure: $(OBJS) $(DEFAULT_MAIN_OBJS) sccbox $(CC) -o configure $(OBJS) $(DEFAULT_MAIN_OBJS) menuconfig: $(OBJS) $(MENULIB_OBJS) $(CC) -o configure $(OBJS) $(MENULIB_OBJS) +src/util/sccbox.o: src/util/sccbox.c + $(CC) -c $(CFLAGS) -o src/util/sccbox.o src/util/sccbox.c + +sccbox: src/util/sccbox.o + $(CC) $(LDFLAGS) -o sccbox src/util/sccbox.o + clean: rm $(OBJS) $(DEFAULT_MAIN_OBJS) configure Index: trunk/scconfig/hooks.c =================================================================== --- trunk/scconfig/hooks.c (revision 353) +++ trunk/scconfig/hooks.c (revision 354) @@ -7,6 +7,8 @@ #include "libs.h" #include "tmpasm_scconfig.h" +#include "../src_3rd/puplug/scconfig_hooks.h" + /* Runs when a custom command line argument is found returns true if no furhter argument processing should be done */ int hook_custom_arg(const char *key, const char *value) @@ -13,7 +15,7 @@ { if (strcmp(key, "debug") == 0) { put("/local/csch/debug", strue); -/* pup_set_debug(strue);*/ + pup_set_debug(strue); return 1; } if (strcmp(key, "profile") == 0) { @@ -35,6 +37,7 @@ { db_mkdir("/local"); db_mkdir("/local/csch"); + pup_hook_postinit(); /* defaults */ put("/local/csch/debug", sfalse); @@ -51,6 +54,8 @@ /* Runs when things should be detected for the host system */ int hook_detect_host() { + pup_hook_detect_host(); + return 0; } @@ -95,11 +100,14 @@ require("sys/types/size/4_u_int", 0, 1); + pup_hook_detect_target(); + return 0; } -static const char *IS_OK(int val) +static const char *IS_OK(int *generr, int val) { + *generr |= val; if (val == 0) return "ok"; return "ERROR"; } @@ -107,9 +115,14 @@ /* Runs after detection hooks, should generate the output (Makefiles, etc.) */ int hook_generate() { - printf("Generating src/libcschem/config.h... %s\n", IS_OK(tmpasm(NULL, "../src/libcschem/config.h.in", "../src/libcschem/config.h"))); - printf("Generating src/libcschem/Makefile... %s\n", IS_OK(tmpasm(NULL, "../src/libcschem/Makefile.in", "../src/libcschem/Makefile"))); - return 0; + int generr = 0; + + put("/local/pup/sccbox", "../../scconfig/sccbox"); + + generr |= pup_hook_generate("../src_3rd/puplug"); + printf("Generating src/libcschem/config.h... %s\n", IS_OK(&generr, tmpasm(NULL, "../src/libcschem/config.h.in", "../src/libcschem/config.h"))); + printf("Generating src/libcschem/Makefile... %s\n", IS_OK(&generr, tmpasm(NULL, "../src/libcschem/Makefile.in", "../src/libcschem/Makefile"))); + return generr; } /* Runs before everything is uninitialized */ Index: trunk/src/libcschem/Makefile.in =================================================================== --- trunk/src/libcschem/Makefile.in (revision 353) +++ trunk/src/libcschem/Makefile.in (revision 354) @@ -11,17 +11,35 @@ @] uniq /local/csch/OBJS +put /local/csch/LIBS_3RD [@ + $(ROOT)/src_3rd/puplug/libpuplug.a + $(ROOT)/src_3rd/libminuid/libminuid.a +@] +uniq /local/csch/LIBS_3RD + put /local/csch/DEPDEPS {} ### Makefile ### print [@ +ROOT=@/local/csch/root@ CC=@cc/cc@ CFLAGS=@/local/csch/CFLAGS@ LDFLAGS=@/local/csch/LDFLAGS@ OBJS = @/local/csch/OBJS@ -all: $(OBJS) +LIBMINUID_CFLAGS=@cc/cflags@ +LIBMINUID_LDFLAGS=@cc/ldflags@ + +all: $(OBJS) @/local/csch/LIBS_3RD@ + + +$(ROOT)/src_3rd/puplug/libpuplug.a: + cd $(ROOT)/src_3rd/puplug && make + +$(ROOT)/src_3rd/libminuid/libminuid.a: + cd $(ROOT)/src_3rd/libminuid && make + @] put /local/comp/OBJS /local/csch/OBJS Index: trunk/src_3rd =================================================================== --- trunk/src_3rd (revision 353) +++ trunk/src_3rd (revision 354) Property changes on: trunk/src_3rd ___________________________________________________________________ Modified: svn:externals ## -2,3 +2,4 ## libminuid svn://svn.repo.hu/libminuid/trunk/libminuid genvector svn://svn.repo.hu/genvector/trunk/genvector genrtree svn://svn.repo.hu/genrtree/trunk/genrtree +puplug svn://svn.repo.hu/puplug/trunk/puplug