From 7ac498c2a2ad00e0a9c850f22a1012a9a3240fb7 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Thu, 14 Jun 2012 23:43:48 -0400 Subject: Tweak build system to allow out-of-tree projects. It's very annoying to have to build libmaple projects in-tree. Users are just copying the repository everywhere. That's stupid. So I made this: https://github.com/mbolivar/example-libmaple-project It needs these patches to work. Add a header and footer for rules.mk files, so we can change them around and things will continue to work for the users, who just include them. In Makefile, add USER_MODULES to LIBMAPLE_MODULES if it's nonempty. This is the hook you use to get your code compiled and linked correctly. Hack build-targets.mk for stupid reasons I hope to fix later. For now, you'll need an empty main.cpp in BOTH the libmaple directory and your directory if you want things to work the way you'd expect. Signed-off-by: Marti Bolivar --- build-targets.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build-targets.mk') diff --git a/build-targets.mk b/build-targets.mk index fb8edc0..aaff2d0 100644 --- a/build-targets.mk +++ b/build-targets.mk @@ -1,5 +1,5 @@ # main project target -$(BUILD_PATH)/main.o: main.cpp +$(BUILD_PATH)/main.o: $(SRCROOT)/main.cpp $(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -o $@ -c $< $(BUILD_PATH)/libmaple.a: $(BUILDDIRS) $(TGT_BIN) -- cgit v1.2.3