]> xenbits.xensource.com Git - people/liuw/rumprun.git/commitdiff
Add an unconditionally run "buildtest"
authorAntti Kantee <pooka@iki.fi>
Wed, 29 Apr 2015 12:22:10 +0000 (12:22 +0000)
committerAntti Kantee <pooka@iki.fi>
Wed, 29 Apr 2015 12:22:10 +0000 (12:22 +0000)
Makes sure that just typing "make" attempts to link at least one
unikernel and expose really obvious problems with changes.

platform/baremetal/Makefile
platform/xen/Makefile

index 99fd53d29748cbf335c331cf7e3ab33272c3eedb..ec317ecf65c0032ca9515e98aeebf09cd0ddd3ea 100644 (file)
@@ -34,7 +34,7 @@ ifeq (${CONFIG_SYSPROXY},yes)
 LIBS_SYSPROXY= -lrumpkern_sysproxy
 endif
 
-all: app-tools include/bmk/machine rumprun.o commonlibs tests
+all: app-tools include/bmk/machine rumprun.o commonlibs buildtest tests
 
 OBJS_BMK-y+=           intr.o clock.o kernel.o undefs.o
 OBJS_BMK-y+=           rumpuser.o rumpconfig.o
@@ -122,11 +122,14 @@ rumprun.o: ${OBJS}
 
 commonlibs: ${BASEDIR}/baremetal/librumprun_base.a ${COREDIR}/baremetal/libbmk_core.a ${RUMPUSERDIR}/baremetal/libbmk_rumpuser.a
 
+buildtest: ../../tests/hello/hello.c rumprun.o commonlibs app-tools
+       $(APP_TOOLS_CC) -DRUMPRUN_TESTER_JUSTMAIN -o $@ $<
+
 tests: rumprun.o commonlibs app-tools
        $(APP_TOOLS_MAKE) -C ../../tests
 
 clean: app-tools_clean
-       rm -f ${OBJS} include/bmk/machine
+       rm -f ${OBJS} include/bmk/machine buildtest
        $(MAKE) -C ../../tests clean
        ( cd ${BASEDIR} && ${RUMPMAKE} MAKEOBJDIR=baremetal cleandir )
        ( cd ${COREDIR} && ${RUMPMAKE} MAKEOBJDIR=baremetal cleandir )
index eafd7d04082e052b279617bbd988855b56cfe042..a816831a0aba99925d2cbb12176bd69b405d37dd 100644 (file)
@@ -67,7 +67,7 @@ $(OBJ_DIR)/%.o: %.c $(HDRS) $(EXTRA_DEPS)
        $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
 
 .PHONY: default
-default: prepare mini-os rumprun app-tools tests
+default: prepare mini-os commonlibs rumprun app-tools tests buildtest
 
 .PHONY: prepare
 prepare:
@@ -101,6 +101,11 @@ rumprun: $(OBJ_DIR)/rumprun.o
 $(OBJ_DIR)/rumprun.o: $(RUMP_OBJS) ${BASEDIR}/xen/librumprun_base.a ${COREDIR}/xen/libbmk_core.a ${RUMPUSERDIR}/xen/libbmk_rumpuser.a
        $(CC) -Wl,-r $(CFLAGS) $(LDFLAGS) $(RUMP_OBJS) -nostdlib -o $@
 
+commonlibs: ${BASEDIR}/baremetal/librumprun_base.a ${COREDIR}/baremetal/libbmk_core.a ${RUMPUSERDIR}/baremetal/libbmk_rumpuser.a
+
+buildtest: ../../tests/hello/hello.c $(OBJ_DIR)/rumprun.o commonlibs app-tools
+       $(APP_TOOLS_CC) -DRUMPRUN_TESTER_JUSTMAIN -o $@ $<
+
 APP_TOOLS_TARGETARCH= $(TARGET_ARCH)
 APP_TOOLS_PLATFORM= xen
 APP_TOOLS_HEADOBJ= $(abspath $(OBJ_DIR)/xen/minios.o)
@@ -120,7 +125,7 @@ tests:
 
 clean: app-tools_clean
        $(MAKE) -C xen OBJ_DIR=$(OBJ_DIR)/xen clean
-       rm -f $(OBJ_DIR)/*.o $(OBJ_DIR)/lib/*.o
+       rm -f $(OBJ_DIR)/*.o $(OBJ_DIR)/lib/*.o buildtest
        $(MAKE) -C ../../tests clean
        ( cd ${BASEDIR} && ${RUMPMAKE} MAKEOBJDIR=xen cleandir )
        ( cd ${COREDIR} && ${RUMPMAKE} MAKEOBJDIR=xen cleandir )