You can use subprojects! :-) A subproject allows you to move some of your files into a subdirectory without changing the end result.
If you want to quickly check that your stuff compiles, you can also go in the subdirectory, and type 'make' there. That will compile the files of the subproject but do nothing else. To use subprojects, you need to modify your GNUmakefile. Say that you are compiling an application. Your GNUmakefile will look something like include $(GNUSTEP_MAKEFILES)/common.make APP_NAME = MyApp MyApp_OBJC_FILES = main.m yup1.m yup2.m include $(GNUSTEP_MAKEFILES)/application.make Now, say that you want to move yup1.m and yup2.m into a subdirectory called 'Yup' without changing the end result. You change the GNUmakefile to look like include $(GNUSTEP_MAKEFILES)/common.make APP_NAME = MyApp MyApp_OBJC_FILES = main.m MyApp_SUBPROJECTS = Yup include $(GNUSTEP_MAKEFILES)/application.make Then you create this directory Yup, put yup1.m and yup2.m into it, and add a Yup/GNUmakefile in the directory to compile them as a 'subproject' -- include $(GNUSTEP_MAKEFILES)/common.make SUBPROJECT_NAME = Yup Yup_OBJC_FILES = yup1.m yup2.m include $(GNUSTEP_MAKEFILES)/subproject.make And that's about it .... when you type 'make' top-level, it will descent into the subproject Yup, compile it, then go up top-level, compile the files top-level, and when it gets to linking, it will link all together into your app :-) If you type 'make' in the subproject, it will just compile the subproject ... useful to check that the stuff compiles (but won't build the final application). Thanks PS: I guess I should add that to the gnustep-make tutorials ... -----Original Message----- From: "Guyou" <[EMAIL PROTECTED]> Sent: Tuesday, September 12, 2006 1:38 pm To: [email protected] Subject: Which directory layout for develoment Hi, Few month ago, I started my first application with GNUStep and Objective-C. It's a quite good experience, but I miss time to work on it. Well. But, my code grows. So, I wish to create some "package" to organize my development. Actually, all my code is in the main directory and compilation is managed with a single GNUmakefile. How can I split/organize my source files? I tried to move some isolated code in a subdirectory and produce a library, but this lib. is not included in the .app directory. So I imagine my reorganisation is incorrect. Is there any documentation around the recommended directory layout for a GNUStep development? Any tips concerning layout for organising unit tests is also welcome. PS: I do not use ProjectCenter or any other GNUStep IDE because: - my first contact was rude (the pop-up menus opened behind the main window, so I was unable to click on it; - GNUStep development is occasionnal, so I prefer to use Eclipse (I also do C/C++ and Java development). Regards, Guyou _______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep _______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
