diff --git a/examples/nxflat/tests/errno/Makefile b/examples/nxflat/tests/errno/Makefile index 4c1ce81802e..110886f92c3 100644 --- a/examples/nxflat/tests/errno/Makefile +++ b/examples/nxflat/tests/errno/Makefile @@ -47,11 +47,14 @@ all: $(BIN) $(OBJS): %.o: %.c $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@ -$(BIN): $(OBJS) - $(NXFLATLD) $(NXFLATLDFLAGS) -o $@ $(OBJS) +$(BIN).rnx: $(OBJS) + $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ + +$(BIN): $(BIN).rnx + touch $(BIN) # For now clean: - rm -f $(BIN) *.o core + rm -f $(BIN) *.o *.rnx *~ .*.swp core install: install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/examples/nxflat/tests/errno/errno.o b/examples/nxflat/tests/errno/errno.o deleted file mode 100644 index eada97cdb81..00000000000 Binary files a/examples/nxflat/tests/errno/errno.o and /dev/null differ diff --git a/examples/nxflat/tests/hello++/Makefile b/examples/nxflat/tests/hello++/Makefile index b1c9977bc12..584c8c4aab9 100644 --- a/examples/nxflat/tests/hello++/Makefile +++ b/examples/nxflat/tests/hello++/Makefile @@ -75,11 +75,17 @@ $(LIBSTDC_STUBS_LIB): # BIN2 contains a class that implements hello world, but it is # not statically initialized. -$(BIN1): $(OBJS1) - $(NXFLATLD) -o $@ $^ +$(BIN1).rnx: $(OBJS1) + $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ -$(BIN2): $(OBJS2) $(LIBSTDC_STUBS_LIB) - $(NXFLATLD) -o $@ $^ +$(BIN1): $(BIN1).rnx + touch $(BIN1) # For now + +$(BIN2).rnx: $(OBJS2) $(LIBSTDC_STUBS_LIB) + $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ + +$(BIN2): $(BIN2).rnx + touch $(BIN2) # For now # BIN3 and BIN4 require that we include --cxx in the xflat-ld command. # This will instruct xflat-ld that we want it to put togethe the correct @@ -87,18 +93,24 @@ $(BIN2): $(OBJS2) $(LIBSTDC_STUBS_LIB) # # BIN3 is equivalent to BIN2 except that is uses static initializers -$(BIN3): $(OBJS3) $(LIBSTDC_STUBS_LIB) - $(XFLATLD) --cxx -o $@ $^ +$(BIN3).rnx: $(OBJS3) $(LIBSTDC_STUBS_LIB) + $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ + +$(BIN3): $(BIN3).rnx + touch $(BIN3) # For now # BIN4 is similar to BIN3 except that it uses the streams code from libstdc++ # # NOTE: libstdc++ is not available for XFLAT as of this writing # -#$(BIN4): $(OBJS4) $(LIBSTDC_STUBS_LIB) -# $(XFLATLD) --cxx -o $@ $^ +#$(BIN4).rnx: $(OBJS4) $(LIBSTDC_STUBS_LIB) +# $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ +# +#$(BIN4): $(BIN4).rnx +# touch $(BIN4) # For now clean: - rm -f $(BIN1) $(BIN2) $(BIN3) $(BIN4) *.o *~ core + rm -f $(BIN1) $(BIN2) $(BIN3) $(BIN4) *.o *.rnx *~ .*.swp core user_install: $(BIN1) $(BIN2) $(BIN3) # $(BIN4) install -D $(BIN1) $(ROMFS_DIR)/$(BIN1) diff --git a/examples/nxflat/tests/hello/Makefile b/examples/nxflat/tests/hello/Makefile index c8cbf6112a9..78492d59f3b 100644 --- a/examples/nxflat/tests/hello/Makefile +++ b/examples/nxflat/tests/hello/Makefile @@ -47,11 +47,14 @@ all: $(BIN) $(OBJS): %.o: %.c $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@ -$(BIN): $(OBJS) - $(NXFLATLD) $(NXFLATLDFLAGS) -o $@ $(OBJS) +$(BIN).rnx: $(OBJS) + $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ + +$(BIN): $(BIN).rnx + touch $(BIN) # For now clean: - rm -f $(BIN) *.o core + rm -f $(BIN) *.o *.rnx *~ .*.swp core install: install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/examples/nxflat/tests/hello/hello.o b/examples/nxflat/tests/hello/hello.o deleted file mode 100644 index 2ba7aa2cebe..00000000000 Binary files a/examples/nxflat/tests/hello/hello.o and /dev/null differ diff --git a/examples/nxflat/tests/longjmp/Makefile b/examples/nxflat/tests/longjmp/Makefile index 80b94d5f802..fea6d419ee6 100644 --- a/examples/nxflat/tests/longjmp/Makefile +++ b/examples/nxflat/tests/longjmp/Makefile @@ -47,11 +47,14 @@ all: $(BIN) $(OBJS): %.o: %.c $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@ -$(BIN): $(OBJS) - $(NXFLATLD) $(NXFLATLDFLAGS) -o $@ $(OBJS) +$(BIN).rnx: $(OBJS) + $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ + +$(BIN): $(BIN).rnx + touch $(BIN) # For now clean: - rm -f $(BIN) *.o core + rm -f $(BIN) *.o *.rnx *~ .*.swp core install: install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/examples/nxflat/tests/mutex/Makefile b/examples/nxflat/tests/mutex/Makefile index 314ed52244e..675a050eb8b 100644 --- a/examples/nxflat/tests/mutex/Makefile +++ b/examples/nxflat/tests/mutex/Makefile @@ -47,11 +47,14 @@ all: $(BIN) $(OBJS): %.o: %.c $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@ -$(BIN): $(OBJS) - $(NXFLATLD) $(NXFLATLDFLAGS) -o $@ $(OBJS) +$(BIN).rnx: $(OBJS) + $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ + +$(BIN): $(BIN).rnx + touch $(BIN) # For now clean: - rm -f $(BIN) *.o core + rm -f $(BIN) *.o *.rnx *~ .*.swp core install: install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/examples/nxflat/tests/pthread/Makefile b/examples/nxflat/tests/pthread/Makefile index c1103d71ca5..04960b7a85e 100644 --- a/examples/nxflat/tests/pthread/Makefile +++ b/examples/nxflat/tests/pthread/Makefile @@ -47,11 +47,14 @@ all: $(BIN) $(OBJS): %.o: %.c $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@ -$(BIN): $(OBJS) - $(NXFLATLD) $(NXFLATLDFLAGS) -o $@ $(OBJS) +$(BIN).rnx: $(OBJS) + $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ + +$(BIN): $(BIN).rnx + touch $(BIN) # For now clean: - rm -f $(BIN) *.o core + rm -f $(BIN) *.o *.rnx *~ .*.swp core install: install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/examples/nxflat/tests/task/Makefile b/examples/nxflat/tests/task/Makefile index b71d135e553..bd93980b0d1 100644 --- a/examples/nxflat/tests/task/Makefile +++ b/examples/nxflat/tests/task/Makefile @@ -47,11 +47,14 @@ all: $(BIN) $(OBJS): %.o: %.c $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@ -$(BIN): $(OBJS) - $(NXFLATLD) $(NXFLATLDFLAGS) -o $@ $(OBJS) +$(BIN).rnx: $(OBJS) + $(NXFLATLD) -r $(NXFLATLDFLAGS) -o $@ $^ + +$(BIN): $(BIN).rnx + touch $(BIN) # For now clean: - rm -f $(BIN) *.o core + rm -f $(BIN) *.o *.rnx *~ .*.swp core install: install -D $(BIN) $(ROMFS_DIR)/$(BIN) diff --git a/examples/nxflat/tests/task/task.c b/examples/nxflat/tests/task/task.c index 96940940921..13490ede15e 100644 --- a/examples/nxflat/tests/task/task.c +++ b/examples/nxflat/tests/task/task.c @@ -111,7 +111,7 @@ int main(int argc, char **argv) child_argv[0] = child_arg; child_argv[1] = 0; - ret = task_create(child_name, 50, 512, child_task, child_argv); + ret = task_create(child_name, 50, 512, child_task, (char**)child_argv); if (ret != 0) { printf("Parent: task_create failed: %d\n", errno);