Index: trunk/tests/pcb-printf/Makefile =================================================================== --- trunk/tests/pcb-printf/Makefile (revision 33267) +++ trunk/tests/pcb-printf/Makefile (revision 33268) @@ -12,19 +12,21 @@ CFLAGS = $(PCB_RND_C89FLAGS) -I$(TRUNK) -I$(SRC) -I$(TRUNK)/src_3rd -I$(TRUNK)/src_3rd/liblihata LDLIBS = -lm -GDS= $(TRUNK)/src_3rd/genvector/gds_char.o -LIBPCB_BASE= $(LIBRND)/core/unit.o $(LIBRND)/core/misc_util.o $(LIBRND)/core/compat_misc.o +LIBPCB_BASE=$(SRC)/librnd-hid.a $(SRC)/librnd-3rd.a glue.o +include $(LIBRND)/core/librnd.mak +LDFLAGS = $(LDFLAGS_LIBRND) + test: tester.diff @echo "pcb-printf: *** QC PASS ***" @rm tester.stdout ; true -prcli: prcli.o $(LIBRND)/core/rnd_printf.o $(LIBRND)/core/misc_util.o $(LIBPCB_BASE) $(GDS) - $(CC) $(LDFLAGS) -o prcli prcli.o $(LIBRND)/core/rnd_printf.o $(LIBRND)/core/misc_util.o $(LIBPCB_BASE) $(GDS) $(LDLIBS) +prcli: prcli.o $(LIBRND)/core/rnd_printf.o $(LIBRND)/core/misc_util.o $(LIBPCB_BASE) + $(CC) $(LDFLAGS) -o prcli prcli.o $(LIBRND)/core/rnd_printf.o $(LIBRND)/core/misc_util.o $(LIBPCB_BASE) $(LDLIBS) -prclimq: prclimq.o $(LIBRND)/core/rnd_printf.o $(LIBRND)/core/misc_util.o $(LIBPCB_BASE) $(GDS) - $(CC) $(LDFLAGS) -o prclimq prclimq.o $(LIBRND)/core/rnd_printf.o $(LIBRND)/core/misc_util.o $(LIBPCB_BASE) $(GDS) $(LDLIBS) +prclimq: prclimq.o $(LIBRND)/core/rnd_printf.o $(LIBRND)/core/misc_util.o $(LIBPCB_BASE) + $(CC) $(LDFLAGS) -o prclimq prclimq.o $(LIBRND)/core/rnd_printf.o $(LIBRND)/core/misc_util.o $(LIBPCB_BASE) $(LDLIBS) prcli.o: prcli.c $(CC) -c $(CFLAGS) prcli.c -o prcli.o @@ -32,12 +34,15 @@ prclimq.o: prclimq.c $(CC) -c $(CFLAGS) prclimq.c -o prclimq.o -tester: tester.o $(LIBRND)/core/rnd_printf.o $(LIBPCB_BASE) $(GDS) - $(CC) $(LDFLAGS) -o tester tester.o $(LIBRND)/core/rnd_printf.o $(LIBPCB_BASE) $(GDS) $(LDLIBS) +glue.o: glue.c + $(CC) -c $(CFLAGS) glue.c -o glue.o -tester_spd: tester_spd.o $(LIBRND)/core/rnd_printf_spd.o $(LIBPCB_BASE) $(GDS) - $(CC) $(LDFLAGS) -o tester_spd tester_spd.o $(LIBRND)/core/rnd_printf_spd.o $(LIBPCB_BASE) $(GDS) $(LDLIBS) +tester: tester.o $(LIBRND)/core/rnd_printf.o $(LIBPCB_BASE) + $(CC) $(LDFLAGS) -o tester tester.o $(LIBRND)/core/rnd_printf.o $(LIBPCB_BASE) $(LDLIBS) +tester_spd: tester_spd.o $(LIBRND)/core/rnd_printf_spd.o $(LIBPCB_BASE) + $(CC) $(LDFLAGS) -o tester_spd tester_spd.o $(LIBRND)/core/rnd_printf_spd.o $(LIBPCB_BASE) $(LDLIBS) + tester.o: tester.c $(CC) -c $(CFLAGS) -o $@ tester.c Index: trunk/tests/pcb-printf/glue.c =================================================================== --- trunk/tests/pcb-printf/glue.c (nonexistent) +++ trunk/tests/pcb-printf/glue.c (revision 33268) @@ -0,0 +1,74 @@ +#include +#include +#include + +/*** hidlib glue ***/ + +const char *rnd_hidlib_default_embedded_menu = ""; +const char *pcb_conf_internal = ""; +const char *rnd_menu_file_paths[] = { "./", NULL }; +const char *rnd_menu_name_fmt = "menu.lht"; + +const char *rnd_conf_userdir_path = "./"; +const char *rnd_pcphl_conf_user_path = "./conf.lht"; + +/* hack for running from ./ without internal version of the conf */ +const char *rnd_conf_sysdir_path = "./"; +const char *rnd_conf_sys_path = "./conf.lht"; + +const char *rnd_app_package = "librnd_test"; +const char *rnd_app_version = "0.0.0"; +const char *rnd_app_url = "n/a"; + + +typedef struct design_s { + rnd_hidlib_t hidlib; /* shall be the first */ +} design_t; + +design_t CTX; + +const pup_buildin_t local_buildins[] = { + {NULL, NULL, NULL, NULL, 0, NULL} +}; + +static const char *action_args[] = { + NULL, NULL, NULL, NULL, NULL /* terminator */ +}; + +void conf_core_init() +{ + rnd_conf_reg_field_(NULL, 1, 0, "should_never_match", "dummy", 0); +} + +void rnd_hidlib_adjust_attached_objects(rnd_hidlib_t *hl) +{ +} + +void *rnd_hidlib_crosshair_suspend(rnd_hidlib_t *hl) +{ + return NULL; +} + +void rnd_hidlib_crosshair_restore(rnd_hidlib_t *hl, void *susp_data) +{ +} + +void rnd_hidlib_crosshair_move_to(rnd_hidlib_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot) +{ +} + +void rnd_draw_marks(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode) +{ +} + +void rnd_draw_attached(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode) +{ +} + +void rnd_expose_main(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *region, rnd_xform_t *xform_caller) +{ +} + +void rnd_expose_preview(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *e) +{ +}