CBLK: Try fixing build for simulation
@@ -33,7 +33,13 @@ snap_peek_objs = force_cpu.o
snap_poke_objs = force_cpu.o
snap_cblk_objs += force_cpu.o
+
+ifdef BUILD_SIMCODE
snap_cblk_libs += ../lib/libsnapcblk.a
+else
+snap_cblk_LDFLAGS += -L../lib
+snap_cblk_libs += -lsnapcblk -lsnap
+endif
projs = snap_peek snap_poke snap_cblk
projs += snap_maint snap_nvme_init
@@ -54,7 +60,7 @@ $(projs): snap_actions.h $(objs) $(libs)
### Generic rule to build a tool
%: %.o
- $(CC) $(LDFLAGS) $@.o $($(@)_objs) $($(@)_libs) $(LDLIBS) -o $@
+ $(CC) $(LDFLAGS) $($(@)_LDFLAGS) $@.o $($(@)_objs) $($(@)_libs) $(LDLIBS) -o $@
%.o: %.c $(libs) $(hfiles)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
