Index: trunk/scconfig/template/plugin_conf.tmpasm =================================================================== --- trunk/scconfig/template/plugin_conf.tmpasm (revision 32628) +++ trunk/scconfig/template/plugin_conf.tmpasm (nonexistent) @@ -1,18 +0,0 @@ -# explicit conf_fields.h generation rules - -switch /local/pcb/mod/CONF - case {^$} end - default - put /local/pcb/mod/CONFOUT /local/pcb/mod/CONF - sub {/local/pcb/mod/CONFOUT} {.h$} {_fields.h} - append /local/pcb/CLEANFILES /local/pcb/mod/CONFOUT - append /local/pcb/DEPDEPS /local/pcb/mod/CONFOUT - append /local/pcb/RULES [@ -# conf generation for @/local/pcb/mod@ '@/local/pcb/mod/CONF@' -@/local/pcb/mod/CONFOUT@: @/local/pcb/mod/CONF@ - AWK=@/host/fstools/awk@ ../scconfig/gen_conf.sh < @/local/pcb/mod/CONF@ > @/local/pcb/mod/CONFOUT@ -@] - end -end - -put /local/pcb/mod/CONF {} Index: trunk/scconfig/template/plugin_sphash.tmpasm =================================================================== --- trunk/scconfig/template/plugin_sphash.tmpasm (revision 32628) +++ trunk/scconfig/template/plugin_sphash.tmpasm (nonexistent) @@ -1,39 +0,0 @@ -# explicit rules: .sphash -> .c -# Space separated list of .sphash input files -# Optional: aux data fileds: $(PLUGDIR)/query/consts.sphash::long:int:val; -switch ?/local/pcb/mod/SPHASH - case {^$} end - default - foreach /local/nn in /local/pcb/mod/SPHASH - put /local/n /local/nn - sub {/local/n} {::.*$} {} - put /local/bn /local/n - sub {/local/bn} {.[^.]*$} {} - put /local/pr /local/bn - sub {/local/pr} {^.*/} {} - switch /local/nn - case {::} - put /local/aux /local/nn - sub {/local/aux} {^.*::} {} - gsub {/local/aux} {:} { } - sub {/local/aux} {^} {--aux "} - append {/local/aux} {"} - end - default - put /local/aux {} - end - end - append /local/pcb/RULES [@ -# sphash for @/local/pcb/mod@ -@/local/bn@_sphash.c @/local/bn@_sphash.h: $(SPHASH) @/local/n@ - $(SPHASH) @/local/aux@ --prefix @/local/pcb/mod@_@/local/pr@ --out @/local/bn@_sphash @?/local/pcb/mod/SPHASH_ARGS@ < @/local/n@ -@] - append /local/pcb/CLEANFILES [@@/local/bn@_sphash.c@] - append /local/pcb/CLEANFILES [@@/local/bn@_sphash.h@] - append /local/pcb/DEPDEPS [@@/local/bn@_sphash.c@] - append /local/pcb/DEPDEPS [@@/local/bn@_sphash.h@] - end - end -end - -put /local/pcb/mod/SPHASH {} Index: trunk/scconfig/template/comp_var.tmpasm =================================================================== --- trunk/scconfig/template/comp_var.tmpasm (revision 32628) +++ trunk/scconfig/template/comp_var.tmpasm (nonexistent) @@ -1,31 +0,0 @@ -# Generate Makefile code to compile .c -> .o -# Arguments: -# /local/comp/OBJS list of .o files (assuming each have at least a .c) -# /local/comp/OBJS_C99 list of .o files (assuming each have at least a .c) for non-c89 compilation - -put /local/comp/output {} -append /local/comp/CFLAGS {} - -foreach /local/o in /local/comp/OBJS -put /local/c /local/o -sub /local/c {.o$} {.c} -append /local/comp/output [@ -@/local/o@: @/local/c@ - $(CC) -c $(C89FLAGS) @/local/comp/CFLAGS@ -o @/local/o@ $< -@] -end - -append /local/comp/OBJS_C99 {} -foreach /local/o in /local/comp/OBJS_C99 -put /local/c /local/o -sub /local/c {.o$} {.c} -append /local/comp/output [@ -@/local/o@: @/local/c@ - $(CC) -c $(CFLAGS) @/local/comp/CFLAGS@ -o @/local/o@ $< -@] -end - -put /local/comp/OBJS {} -put /local/comp/OBJS_C99 {} -put /local/comp/CFLAGS {} - Index: trunk/scconfig/template/debug.tmpasm =================================================================== --- trunk/scconfig/template/debug.tmpasm (revision 32628) +++ trunk/scconfig/template/debug.tmpasm (nonexistent) @@ -1,10 +0,0 @@ -# append debug or production flags to CFLAGS, depending on the global debug flag - -if /local/pcb/debug then - append /local/pcb/CFLAGS [@ -g -O0 @?cc/argstd/Wall@ @] -else - if /local/pcb/symbols then - append /local/pcb/CFLAGS [@ -g @] - end - append /local/pcb/CFLAGS { -O3 -DNDEBUG } -end Index: trunk/scconfig/template/compile.tmpasm =================================================================== --- trunk/scconfig/template/compile.tmpasm (revision 32628) +++ trunk/scconfig/template/compile.tmpasm (nonexistent) @@ -1,60 +0,0 @@ -# Generate Makefile code to compile .c -> .o -# Arguments: -# /local/comp/OBJS list of .o files (assuming each have at least a .c) -# /local/comp/OBJS_C99 list of .o files (assuming each have at least a .c), for non-c89 compilation - -print { -### explicit rules for .c -> .o ### -} - -append /local/comp/CFLAGS {} - -foreach /local/o in /local/comp/OBJS -put /local/c /local/o -sub /local/c {.o$} {.c} -switch /local/c - case {.*_y[.]c} - put /local/extinc [@ -I@/local/c@@] - sub /local/extinc {/[^/]*$} {} - end - case {.*_l[.]c} - put /local/extinc [@ -I@/local/c@@] - sub /local/extinc {/[^/]*$} {} - end - default - put /local/extinc {} - end -end -print [@ -@/local/o@: @/local/c@ - $(CC) -c $(C89FLAGS) @/local/comp/CFLAGS@@/local/extinc@ -o @/local/o@ $< -@] -end - -append /local/comp/OBJS_C99 {} -foreach /local/o in /local/comp/OBJS_C99 -put /local/c /local/o -sub /local/c {.o$} {.c} -switch /local/c - case {.*_y[.]c} - put /local/extinc [@ -I@/local/c@@] - sub /local/extinc {/[^/]*$} {} - end - case {.*_l[.]c} - put /local/extinc [@ -I@/local/c@@] - sub /local/extinc {/[^/]*$} {} - end - default - put /local/extinc {} - end -end -print [@ -@/local/o@: @/local/c@ - $(CC) -c $(CFLAGS) @/local/comp/CFLAGS@@/local/extinc@ -o @/local/o@ $< -@] -end - -put /local/comp/OBJS {} -put /local/comp/OBJS_C99 {} -put /local/comp/CFLAGS {} - Index: trunk/scconfig/template/cdep.tmpasm =================================================================== --- trunk/scconfig/template/cdep.tmpasm (revision 32628) +++ trunk/scconfig/template/cdep.tmpasm (nonexistent) @@ -1,72 +0,0 @@ -# Generate Makefile code that can generate Makefile.dep -# Arguments: -# /local/dep/CFLAGS CFLAGS used for compiling -# /local/dep/SRCS list of c soures -# /local/pcb/DEPDEPS targets make dep should generate first - -sortuniq /local/pcb/DEPDEPS_SORTED /local/pcb/DEPDEPS - -print [@ - -### generate dependencies (requires gcc) ### -FORCE: - -include Makefile.dep - -DEPDEPS=@/local/pcb/DEPDEPS_SORTED@ - -dep: FORCE $(DEPDEPS) - make -f Makefile.depgen PLUGDIR=$(PLUGDIR) LIBRND=$(LIBRND) LIBRND_PLUGDIR=$(LIBRND)/plugins SRC_3RD_DIR=$(SRC_3RD_DIR) -@] - -append /local/dep/CFLAGS {-D_PCB_DEP_} -gsub /local/dep/CFLAGS {-I} {-isystem } -gsub /local/dep/CFLAGS {-isystem [.][.]} {-I ..} -gsub /local/dep/CFLAGS {-isystem [.]} { -I. } -sortuniq /local/dep/SRCS_SORTED /local/dep/SRCS - -redir {Makefile.depgen} - -print [@ -# Generated by configure - DO NOT EDIT - -LIBRND=../src/librnd - -# Calculate dependencies, assuming all generated files present and -# SRC_3RD_DIR and PLUGDIR are set - -all: - echo "### Generated file, do not edit, run make dep ###" > Makefile.dep.tmp - echo "" >> Makefile.dep.tmp -@] - -foreach /local/c in /local/dep/SRCS_SORTED - put /local/o /local/c - sub {/local/o} {.c$} {.o} - sub {/local/c} {.o$} {.c} - switch /local/c - case {/src_plugins/} end - case {$(PLUGDIR)} - print [@ gcc -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ @/local/pcb/DEPCFLAGS@ >> Makefile.dep.tmp -@]; end - case {$(LIBRND_PLUGDIR)} - print [@ gcc -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp -@]; end - case {$(LIBRND)} - print [@ gcc -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp -@]; end - case {$(SRC_3RD_DIR)} - print [@ gcc -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp -@]; end - case {../src_3rd/} - print [@ gcc -MT @/local/o@ -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp -@]; end - - default print [@ gcc -MM @/local/c@ @/local/dep/CFLAGS@ >> Makefile.dep.tmp -@]; end - end -end - -print [@ - sed "s^ librnd/^ ../src_3rd/librnd/^g" < Makefile.dep.tmp > Makefile.dep && rm Makefile.dep.tmp -@] Index: trunk/scconfig/template/plugin_intmenu.tmpasm =================================================================== --- trunk/scconfig/template/plugin_intmenu.tmpasm (revision 32628) +++ trunk/scconfig/template/plugin_intmenu.tmpasm (nonexistent) @@ -1,31 +0,0 @@ -# Set up internal embedde dconfig -# Input: /local/pcb/mod/MENUFILE is the file name of the conf file (without path) -# /local/pcb/mod/MENUVAR is the variable name to use in menu_internal.c - -switch ?/local/pcb/mod/MENUFILE -case {...} -put /local/pcb/MMENU [@$(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod/MENUFILE@@] -put /local/pcb/IMENU [@$(PLUGDIR)/@/local/pcb/mod@/menu_internal.c@] - -append /local/pcb/DEPDEPS [@ @/local/pcb/IMENU@ @] -append /local/pcb/DISTCLEANFILES [@ @/local/pcb/IMENU@ @] -append /local/pcb/RULES [@ -@/local/pcb/IMENU@: @/local/pcb/MMENU@ $(CQUOTE) - $(CQUOTE) -n @/local/pcb/mod/MENUVAR@ < @/local/pcb/MMENU@ > @/local/pcb/IMENU@ -@] - - -# plugin menu exists only as internal for now -#switch /local/pcb/mod/enabled -# case {1} -# append /local/pcb/rules/install_ [@ -# $(SCCBOX) $(HOW) "@/local/pcb/MMENU@" "$(CONFDIR)/@/local/pcb/mod/MENUFILE@"@] -# end -# default end; -#end - -end -default -end -end - Index: trunk/scconfig/template/plugin_intconf.tmpasm =================================================================== --- trunk/scconfig/template/plugin_intconf.tmpasm (revision 32628) +++ trunk/scconfig/template/plugin_intconf.tmpasm (nonexistent) @@ -1,39 +0,0 @@ -# Set up internal embedde dconfig -# Input: /local/pcb/mod/CONFFILE is the file name of the conf file (without path) -# /local/pcb/mod/CONFVAR is the variable name to use in conf_internal.c - -switch ?/local/pcb/mod/CONFFILE -case {...} - -put /local/pcb/mod/is_hidlib [@/local/pcb/@/local/pcb/mod@/hidlib@] -resolve /local/pcb/mod/is_hidlib ?/local/pcb/mod/is_hidlib -if ?/local/pcb/mod/is_hidlib -then - put /local/pcb/MCFG [@$(LIBRND_PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod/CONFFILE@@] - put /local/pcb/ICFG [@$(LIBRND_PLUGDIR)/@/local/pcb/mod@/conf_internal.c@] -else - put /local/pcb/MCFG [@$(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod/CONFFILE@@] - put /local/pcb/ICFG [@$(PLUGDIR)/@/local/pcb/mod@/conf_internal.c@] -end - -append /local/pcb/DEPDEPS [@ @/local/pcb/ICFG@ @] -append /local/pcb/DISTCLEANFILES [@ @/local/pcb/ICFG@ @] -append /local/pcb/RULES [@ -@/local/pcb/ICFG@: @/local/pcb/MCFG@ $(CQUOTE) - $(CQUOTE) -n @/local/pcb/mod/CONFVAR@ < @/local/pcb/MCFG@ > @/local/pcb/ICFG@ -@] - - -switch /local/pcb/mod/enabled - case {1} - append /local/pcb/rules/install_ [@ - $(SCCBOX) $(HOW) "@/local/pcb/MCFG@" "$(CONFDIR)/@/local/pcb/mod/CONFFILE@"@] - end - default end; -end - -end -default -end -end - Index: trunk/src/Makefile.in =================================================================== --- trunk/src/Makefile.in (revision 32628) +++ trunk/src/Makefile.in (revision 32629) @@ -40,7 +40,7 @@ # These files are to be generated before make dep is run put /local/pcb/DEPDEPS { $(LIBRND)/core/hidlib_conf_fields.h conf_core_fields.h conf_internal.c defpcb_internal.c buildin.c buildin.hidlib.c pcb_menu_default.c } -include {../scconfig/template/debug.tmpasm} +include {../src_3rd/librnd/scconfig/template/debug.tmpasm} # main: objects # hidlib will be a library that provides: @@ -294,10 +294,10 @@ put /local/pcb/tmpasm/plugin {../src_plugins/Plugin.tmpasm} put /local/pcb/tmpasm/disable {../src_plugins/Disable.tmpasm} put /local/pcb/tmpasm/common_enabled {../src_plugins/Common_enabled.tmpasm} -put /local/pcb/tmpasm/plugin_sphash {../scconfig/template/plugin_sphash.tmpasm} -put /local/pcb/tmpasm/plugin_conf {../scconfig/template/plugin_conf.tmpasm} -put /local/pcb/tmpasm/plugin_intconf {../scconfig/template/plugin_intconf.tmpasm} -put /local/pcb/tmpasm/plugin_intmenu {../scconfig/template/plugin_intmenu.tmpasm} +put /local/pcb/tmpasm/plugin_sphash {../src_3rd/librnd/scconfig/template/plugin_sphash.tmpasm} +put /local/pcb/tmpasm/plugin_conf {../src_3rd/librnd/scconfig/template/plugin_conf.tmpasm} +put /local/pcb/tmpasm/plugin_intconf {../src_3rd/librnd/scconfig/template/plugin_intconf.tmpasm} +put /local/pcb/tmpasm/plugin_intmenu {../src_3rd/librnd/scconfig/template/plugin_intmenu.tmpasm} include {../src_plugins/plugins_ALL.tmpasm} @@ -677,13 +677,13 @@ # generate explicit rules for .c -> .o put /local/comp/OBJS /local/pcb/OBJS put /local/comp/OBJS_C99 ?/local/pcb/OBJS_C99 -include {../scconfig/template/compile.tmpasm} +include {../src_3rd/librnd/scconfig/template/compile.tmpasm} print [@ # for extern utils:@] put /local/comp/OBJS /local/pcb/OBJS_UTIL -include {../scconfig/template/compile.tmpasm} +include {../src_3rd/librnd/scconfig/template/compile.tmpasm} # generate deps put /local/dep/CFLAGS /local/pcb/CFLAGS @@ -691,7 +691,7 @@ gsub /local/pcb/DEPSRCS {.o } {.c } append /local/dep/SRCS /local/pcb/DEPSRCS -include {../scconfig/template/cdep.tmpasm} +include {../src_3rd/librnd/scconfig/template/cdep.tmpasm} # librnd separation, temporary workaround: # since pcb-rnd is trying to build everything without using librnd's build system Index: trunk/util/gsch2pcb-rnd/Makefile.in =================================================================== --- trunk/util/gsch2pcb-rnd/Makefile.in (revision 32628) +++ trunk/util/gsch2pcb-rnd/Makefile.in (revision 32629) @@ -2,7 +2,7 @@ append /local/pcb/CFLAGS {-I../.. -I../../src_3rd -I../../src -I../../src_3rd/liblihata -DSCMDIR="\\"$(LIBDIR_INSTALLED)\\""} append /local/pcb/LDFLAGS cc/ldflags append /local/pcb/LDFLAGS ?/target/libs/ldl -include {../scconfig/template/debug.tmpasm} +include {../src_3rd/librnd/scconfig/template/debug.tmpasm} print [@ ROOT=../.. @@ -86,7 +86,7 @@ # generate explicit rules for .c -> .o put /local/comp/OBJS /local/pcb/OBJS -include {../scconfig/template/compile.tmpasm} +include {../src_3rd/librnd/scconfig/template/compile.tmpasm} print [@