Index: trunk/scconfig/hooks.c =================================================================== --- trunk/scconfig/hooks.c (revision 1072) +++ trunk/scconfig/hooks.c (revision 1073) @@ -40,9 +40,9 @@ {"buildin-gpmi", "/local/pcb/gpmi/buildin", arg_true, "$static link the gpmi plugin into the executable"}, {"plugin-gpmi", "/local/pcb/gpmi/buildin", arg_false, "$the gpmi plugin is dynamic loadable"}, - {"disable-autorouter", "/local/pcb/autorouter/enable", arg_false, "$do not compile the autorouter"}, - {"buildin-autorouter", "/local/pcb/autorouter/buildin", arg_true, "$static link the autorouter plugin into the executable"}, - {"plugin-autorouter", "/local/pcb/autorouter/buildin", arg_false, "$the autorouter plugin is dynamic loadable"}, + {"disable-autoroute", "/local/pcb/autoroute/enable", arg_false, "$do not compile the autorouter"}, + {"buildin-autoroute", "/local/pcb/autoroute/buildin", arg_true, "$static link the autorouter plugin into the executable"}, + {"plugin-autoroute", "/local/pcb/autoroute/buildin", arg_false, "$the autorouter plugin is dynamic loadable"}, {"disable-autoplace", "/local/pcb/autoplace/enable", arg_false, "$do not compile the autoplace"}, {"buildin-autoplace", "/local/pcb/autoplace/buildin", arg_true, "$static link the autoplace plugin into the executable"}, @@ -132,9 +132,9 @@ put("/local/prefix", "/usr/local"); - db_mkdir("/local/pcb/autorouter"); - put("/local/pcb/autorouter/enable", strue); - put("/local/pcb/autorouter/buildin", strue); + db_mkdir("/local/pcb/autoroute"); + put("/local/pcb/autoroute/enable", strue); + put("/local/pcb/autoroute/buildin", strue); db_mkdir("/local/pcb/autoplace"); put("/local/pcb/autoplace/enable", strue); @@ -377,7 +377,7 @@ else printf("no\n"); - plugin_stat("Autorouter: ", "/local/pcb/autorouter"); + plugin_stat("Autorouter: ", "/local/pcb/autoroute"); plugin_stat("Toporouter: ", "/local/pcb/toporouter"); plugin_stat("Autoplace: ", "/local/pcb/autoplace"); plugin_stat("Vendor drill mapping: ", "/local/pcb/vendordrill"); Index: trunk/src/Makefile.in =================================================================== --- trunk/src/Makefile.in (revision 1072) +++ trunk/src/Makefile.in (revision 1073) @@ -150,7 +150,13 @@ # *** DO NOT EDIT THIS FILE *** # This file has been generated from Makefile.in by configure # *** DO NOT EDIT THIS FILE *** + +# plugin source PLUGDIR=../src_plugins + +# plugin source install - so that pcb-rnd runs from source properly +PLUGIDIR=plugins + @/local/pcb/TOPVARS@ OBJS=@/local/pcb/OBJS@ SRCS=@/local/pcb/SRCS@ Index: trunk/src/Makefile.in.mod/Buildin =================================================================== --- trunk/src/Makefile.in.mod/Buildin (nonexistent) +++ trunk/src/Makefile.in.mod/Buildin (revision 1073) @@ -0,0 +1,12 @@ +# tmpasm script for compiling a plugin_src/ module as a buildin +# Requires variables before the include: +# /local/pcb/mod basename of the module (e.g. autoplace) +# /local/pcb/mod/OBJS full path of all object files + +append /local/pcb/buildin_init [@ extern void hid_@/local/pcb/mod@_init(); hid_@/local/pcb/mod@_init(); plugin_register("@/local/pcb/mod@", "<@/local/pcb/mod@>", NULL, 0); @] +append /local/pcb/OBJS /local/pcb/mod/OBJS +append /local/pcb/RULES [@ + +mod_@/local/pcb/mod@: all + +@] Index: trunk/src/Makefile.in.mod/Plugin =================================================================== --- trunk/src/Makefile.in.mod/Plugin (nonexistent) +++ trunk/src/Makefile.in.mod/Plugin (revision 1073) @@ -0,0 +1,20 @@ +# tmpasm script for compiling a plugin_src/ module as a plugin +# Requires variables before the include: +# /local/pcb/mod basename of the module (e.g. autoplace) +# /local/pcb/mod/OBJS full path of all object files + +append /local/pcb/all [@ $(PLUGIDIR)/@/local/pcb/mod@.so @] + +append /local/pcb/RULES [@ + +$(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so: @/local/pcb/mod/OBJS@ + $(CC) $(LDFLAGS) -shared @cc/rdynamic@ -o $(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so @/local/pcb/mod/OBJS@ + +mod_@/local/pcb/mod@: $(PLUGIDIR)/@/local/pcb/mod@.so + + +$(PLUGIDIR)/@/local/pcb/mod@.so: $(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so + $(MKDIR) $(PLUGIDIR) + $(CP) $(PLUGDIR)/@/local/pcb/mod@/@/local/pcb/mod@.so $(PLUGIDIR)/@/local/pcb/mod@.so + +@] Index: trunk/src_plugins/autoplace/Makefile =================================================================== --- trunk/src_plugins/autoplace/Makefile (revision 1072) +++ trunk/src_plugins/autoplace/Makefile (revision 1073) @@ -1,4 +1,5 @@ all: cd ../../src && make mod_autoplace - +clean: + rm *.o *.so 2>/dev/null ; true Index: trunk/src_plugins/autoplace/Makefile.mod =================================================================== --- trunk/src_plugins/autoplace/Makefile.mod (revision 1072) +++ trunk/src_plugins/autoplace/Makefile.mod (revision 1073) @@ -1,27 +1,16 @@ append /local/pcb/autoplace/enable {} append /local/pcb/autoplace/buildin {} -append /local/pcb/autoplace/OBJS [@ $(PLUGDIR)/autoplace/autoplace.o $(PLUGDIR)/autoplace/action.o @] +put /local/pcb/mod {autoplace} +put /local/pcb/mod/OBJS [@ $(PLUGDIR)/autoplace/autoplace.o $(PLUGDIR)/autoplace/action.o @] if /local/pcb/autoplace/enable then if /local/pcb/autoplace/buildin then - append /local/pcb/buildin_init { extern void hid_autoplace_init(); hid_autoplace_init(); plugin_register("autoplace", "", NULL, 0); } - append /local/pcb/OBJS /local/pcb/autoplace/OBJS - append /local/pcb/RULES [@ - -mod_autoplace: all - -@] - + include {Makefile.in.mod/Buildin} else - append /local/pcb/all [@ $(PLUGDIR)/autoplace/autoplace.so @] - append /local/pcb/RULES [@ + include {Makefile.in.mod/Plugin} + end +end -$(PLUGDIR)/autoplace/autoplace.so: @/local/pcb/autoplace/OBJS@ - $(CC) $(LDFLAGS) -shared @cc/rdynamic@ -o $(PLUGDIR)/autoplace/autoplace.so @/local/pcb/autoplace/OBJS@ -mod_autoplace: $(PLUGDIR)/autoplace/autoplace.so -@] - end -end Index: trunk/src_plugins/autoroute/Makefile =================================================================== --- trunk/src_plugins/autoroute/Makefile (revision 1072) +++ trunk/src_plugins/autoroute/Makefile (revision 1073) @@ -1,4 +1,5 @@ all: cd ../../src && make mod_autoroute - +clean: + rm *.o *.so 2>/dev/null ; true Index: trunk/src_plugins/autoroute/Makefile.mod =================================================================== --- trunk/src_plugins/autoroute/Makefile.mod (revision 1072) +++ trunk/src_plugins/autoroute/Makefile.mod (revision 1073) @@ -1,27 +1,13 @@ -append /local/pcb/autorouter/enable {} -append /local/pcb/autorouter/buildin {} +append /local/pcb/autoroute/enable {} +append /local/pcb/autoroute/buildin {} -append /local/pcb/autorouter/OBJS [@ $(PLUGDIR)/autoroute/autoroute.o $(PLUGDIR)/autoroute/mtspace.o $(PLUGDIR)/autoroute/action.o @] +put /local/pcb/mod {autoroute} +put /local/pcb/mod/OBJS [@ $(PLUGDIR)/autoroute/autoroute.o $(PLUGDIR)/autoroute/mtspace.o $(PLUGDIR)/autoroute/action.o @] -if /local/pcb/autorouter/enable then - if /local/pcb/autorouter/buildin then - append /local/pcb/buildin_init { extern void hid_autoroute_init(); hid_autoroute_init(); plugin_register("autoroute", "", NULL, 0); } - append /local/pcb/OBJS /local/pcb/autorouter/OBJS - append /local/pcb/RULES [@ - -mod_autoroute: all - -@] - +if /local/pcb/autoroute/enable then + if /local/pcb/autoroute/buildin then + include {Makefile.in.mod/Buildin} else - append /local/pcb/all [@ $(PLUGDIR)/autoroute/autoroute.so @] - append /local/pcb/RULES [@ - -$(PLUGDIR)/autoroute/autoroute.so: @/local/pcb/autorouter/OBJS@ - $(CC) $(LDFLAGS) -shared @cc/rdynamic@ -o $(PLUGDIR)/autoroute/autoroute.so @/local/pcb/autorouter/OBJS@ - -mod_autoroute: $(PLUGDIR)/autoroute/autoroute.so - -@] + include {Makefile.in.mod/Plugin} end end Index: trunk/src_plugins/autoroute/action.c =================================================================== --- trunk/src_plugins/autoroute/action.c (revision 1072) +++ trunk/src_plugins/autoroute/action.c (revision 1073) @@ -79,16 +79,16 @@ return 0; } -HID_Action autorouter_action_list[] = { +HID_Action autoroute_action_list[] = { {"AutoRoute", 0, ActionAutoRoute, autoroute_help, autoroute_syntax} , }; -REGISTER_ACTIONS(autorouter_action_list) +REGISTER_ACTIONS(autoroute_action_list) #include "dolists.h" void hid_autoroute_init(void) { - REGISTER_ACTIONS(autorouter_action_list) + REGISTER_ACTIONS(autoroute_action_list) } Index: trunk/src_plugins/djopt/Makefile =================================================================== --- trunk/src_plugins/djopt/Makefile (revision 1072) +++ trunk/src_plugins/djopt/Makefile (revision 1073) @@ -1,4 +1,6 @@ all: cd ../../src && make mod_djopt +clean: + rm *.o *.so 2>/dev/null ; true Index: trunk/src_plugins/djopt/Makefile.mod =================================================================== --- trunk/src_plugins/djopt/Makefile.mod (revision 1072) +++ trunk/src_plugins/djopt/Makefile.mod (revision 1073) @@ -1,27 +1,12 @@ append /local/pcb/djopt/enable {} append /local/pcb/djopt/buildin {} -append /local/pcb/djopt/OBJS [@ $(PLUGDIR)/djopt/djopt.o @] +put /local/pcb/mod {djopt} +append /local/pcb/mod/OBJS [@ $(PLUGDIR)/djopt/djopt.o @] if /local/pcb/djopt/enable then - if /local/pcb/djopt/buildin then - append /local/pcb/buildin_init { extern void hid_djopt_init(); hid_djopt_init(); plugin_register("djopt", "", NULL, 0); } - append /local/pcb/OBJS /local/pcb/djopt/OBJS - append /local/pcb/RULES [@ - -mod_djopt: all - -@] - + include {Makefile.in.mod/Buildin} else - append /local/pcb/all [@ $(PLUGDIR)/djopt/djopt.so @] - append /local/pcb/RULES [@ - -$(PLUGDIR)/djopt/djopt.so: @/local/pcb/djopt/OBJS@ - $(CC) $(LDFLAGS) -shared @cc/rdynamic@ -o $(PLUGDIR)/djopt/djopt.so @/local/pcb/djopt/OBJS@ - -mod_djopt: $(PLUGDIR)/djopt/djopt.so - -@] + include {Makefile.in.mod/Plugin} end end Index: trunk/src_plugins/edif/Makefile =================================================================== --- trunk/src_plugins/edif/Makefile (revision 1072) +++ trunk/src_plugins/edif/Makefile (revision 1073) @@ -1,4 +1,6 @@ all: cd ../../src && make mod_edif +clean: + rm *.o *.so 2>/dev/null ; true Index: trunk/src_plugins/edif/Makefile.mod =================================================================== --- trunk/src_plugins/edif/Makefile.mod (revision 1072) +++ trunk/src_plugins/edif/Makefile.mod (revision 1073) @@ -1,28 +1,14 @@ append /local/pcb/edif/enable {} append /local/pcb/edif/buildin {} -append /local/pcb/edif/OBJS [@ $(PLUGDIR)/edif/edif.o @] +put /local/pcb/mod {edif} +append /local/pcb/mod/OBJS [@ $(PLUGDIR)/edif/edif.o @] append /local/pcb/YACC {edif} if /local/pcb/edif/enable then if /local/pcb/edif/buildin then - append /local/pcb/buildin_init { extern void hid_edif_init(); hid_edif_init(); plugin_register("edif", "", NULL, 0); } - append /local/pcb/OBJS /local/pcb/edif/OBJS - append /local/pcb/RULES [@ - -mod_edif: all - -@] - + include {Makefile.in.mod/Buildin} else - append /local/pcb/all [@ $(PLUGDIR)/edif/edif.so @] - append /local/pcb/RULES [@ - -$(PLUGDIR)/edif/edif.so: @/local/pcb/edif/OBJS@ - $(CC) $(LDFLAGS) -shared @cc/rdynamic@ -o $(PLUGDIR)/edif/edif.so @/local/pcb/edif/OBJS@ - -mod_edif: $(PLUGDIR)/edif/edif.so - -@] + include {Makefile.in.mod/Plugin} end end Index: trunk/src_plugins/gpmi/Makefile =================================================================== --- trunk/src_plugins/gpmi/Makefile (revision 1072) +++ trunk/src_plugins/gpmi/Makefile (revision 1073) @@ -1,4 +1,6 @@ all: cd ../../src && make mod_pcb_gpmi +clean: + rm *.o *.so 2>/dev/null ; true Index: trunk/src_plugins/gpmi/Makefile.mod =================================================================== --- trunk/src_plugins/gpmi/Makefile.mod (revision 1072) +++ trunk/src_plugins/gpmi/Makefile.mod (revision 1073) @@ -48,16 +48,20 @@ @] else - append /local/pcb/all [@ $(PCB_GPMI)/gpmi_plugin/pcb_gpmi.so @] + append /local/pcb/all [@ $(PLUGIDIR)/gpmi_plugin.so @] append /local/pcb/RULES [@ -mod_pcb_gpmi: $(PCB_GPMI)/gpmi_plugin/pcb_gpmi.so +mod_pcb_gpmi: $(PLUGIDIR)/gpmi_plugin.so +$(PLUGIDIR)/gpmi_plugin.so: $(PCB_GPMI)/gpmi_plugin/gpmi_plugin.so + $(MKDIR) $(PLUGIDIR) + $(CP) $(PCB_GPMI)/gpmi_plugin/gpmi_plugin.so $(PLUGIDIR)/gpmi_plugin.so + @] append /local/pcb/RULES [@ -$(PCB_GPMI)/gpmi_plugin/pcb_gpmi.so: FORCE +$(PCB_GPMI)/gpmi_plugin/gpmi_plugin.so: FORCE cd $(PCB_GPMI)/gpmi_plugin && make all_plugin @] Index: trunk/src_plugins/mincut/Makefile =================================================================== --- trunk/src_plugins/mincut/Makefile (revision 1072) +++ trunk/src_plugins/mincut/Makefile (revision 1073) @@ -1,4 +1,6 @@ all: cd ../../src && make mod_mincut +clean: + rm *.o *.so 2>/dev/null ; true Index: trunk/src_plugins/mincut/Makefile.mod =================================================================== --- trunk/src_plugins/mincut/Makefile.mod (revision 1072) +++ trunk/src_plugins/mincut/Makefile.mod (revision 1073) @@ -1,27 +1,13 @@ append /local/pcb/mincut/enable {} append /local/pcb/mincut/buildin {} -append /local/pcb/mincut/OBJS [@ $(PLUGDIR)/mincut/rats_mincut.o $(PLUGDIR)/mincut/pcb-mincut/graph.o $(PLUGDIR)/mincut/pcb-mincut/solve.o @] +put /local/pcb/mod {mincut} +append /local/pcb/mod/OBJS [@ $(PLUGDIR)/mincut/rats_mincut.o $(PLUGDIR)/mincut/pcb-mincut/graph.o $(PLUGDIR)/mincut/pcb-mincut/solve.o @] if /local/pcb/mincut/enable then if /local/pcb/mincut/buildin then - append /local/pcb/buildin_init { extern void hid_mincut_init(); hid_mincut_init(); plugin_register("mincut", "", NULL, 0); } - append /local/pcb/OBJS /local/pcb/mincut/OBJS - append /local/pcb/RULES [@ - -mod_mincut: all - -@] - + include {Makefile.in.mod/Buildin} else - append /local/pcb/all [@ $(PLUGDIR)/mincut/mincut.so @] - append /local/pcb/RULES [@ - -$(PLUGDIR)/mincut/mincut.so: @/local/pcb/mincut/OBJS@ - $(CC) $(LDFLAGS) -shared @cc/rdynamic@ -o $(PLUGDIR)/mincut/mincut.so @/local/pcb/mincut/OBJS@ - -mod_mincut: $(PLUGDIR)/mincut/mincut.so - -@] + include {Makefile.in.mod/Plugin} end end Index: trunk/src_plugins/puller/Makefile =================================================================== --- trunk/src_plugins/puller/Makefile (revision 1072) +++ trunk/src_plugins/puller/Makefile (revision 1073) @@ -1,4 +1,6 @@ all: cd ../../src && make mod_puller +clean: + rm *.o *.so 2>/dev/null ; true Index: trunk/src_plugins/puller/Makefile.mod =================================================================== --- trunk/src_plugins/puller/Makefile.mod (revision 1072) +++ trunk/src_plugins/puller/Makefile.mod (revision 1073) @@ -1,27 +1,13 @@ append /local/pcb/puller/enable {} append /local/pcb/puller/buildin {} -append /local/pcb/puller/OBJS [@ $(PLUGDIR)/puller/puller.o @] +put /local/pcb/mod {puller} +append /local/pcb/mod/OBJS [@ $(PLUGDIR)/puller/puller.o @] if /local/pcb/puller/enable then if /local/pcb/puller/buildin then - append /local/pcb/buildin_init { extern void hid_puller_init(); hid_puller_init(); plugin_register("puller", "", NULL, 0); } - append /local/pcb/OBJS /local/pcb/puller/OBJS - append /local/pcb/RULES [@ - -mod_puller: all - -@] - + include {Makefile.in.mod/Buildin} else - append /local/pcb/all [@ $(PLUGDIR)/puller/puller.so @] - append /local/pcb/RULES [@ - -$(PLUGDIR)/puller/puller.so: @/local/pcb/puller/OBJS@ - $(CC) $(LDFLAGS) -shared @cc/rdynamic@ -o $(PLUGDIR)/puller/puller.so @/local/pcb/puller/OBJS@ - -mod_puller: $(PLUGDIR)/puller/puller.so - -@] + include {Makefile.in.mod/Plugin} end end Index: trunk/src_plugins/vendordrill/Makefile =================================================================== --- trunk/src_plugins/vendordrill/Makefile (revision 1072) +++ trunk/src_plugins/vendordrill/Makefile (revision 1073) @@ -1,4 +1,6 @@ all: cd ../../src && make mod_vendordrill +clean: + rm *.o *.so 2>/dev/null ; true Index: trunk/src_plugins/vendordrill/Makefile.mod =================================================================== --- trunk/src_plugins/vendordrill/Makefile.mod (revision 1072) +++ trunk/src_plugins/vendordrill/Makefile.mod (revision 1073) @@ -1,27 +1,13 @@ append /local/pcb/vendordrill/enable {} append /local/pcb/vendordrill/buildin {} -append /local/pcb/vendordrill/OBJS [@ $(PLUGDIR)/vendordrill/vendor.o @] +put /local/pcb/mod {vendordrill} +append /local/pcb/mod/OBJS [@ $(PLUGDIR)/vendordrill/vendor.o @] if /local/pcb/vendordrill/enable then if /local/pcb/vendordrill/buildin then - append /local/pcb/buildin_init { extern void hid_vendordrill_init(); hid_vendordrill_init(); plugin_register("vendordrill", "", NULL, 0); } - append /local/pcb/OBJS /local/pcb/vendordrill/OBJS - append /local/pcb/RULES [@ - -mod_vendordrill: all - -@] - + include {Makefile.in.mod/Buildin} else - append /local/pcb/all [@ $(PLUGDIR)/vendordrill/vendordrill.so @] - append /local/pcb/RULES [@ - -$(PLUGDIR)/vendordrill/vendordrill.so: @/local/pcb/vendordrill/OBJS@ - $(CC) $(LDFLAGS) -shared @cc/rdynamic@ -o $(PLUGDIR)/vendordrill/vendordrill.so @/local/pcb/vendordrill/OBJS@ - -mod_vendordrill: $(PLUGDIR)/vendordrill/vendordrill.so - -@] + include {Makefile.in.mod/Plugin} end end