help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

organizing larger projects


From: cppaddict
Subject: organizing larger projects
Date: Tue, 29 Jun 2004 17:38:56 -0000

I am in need of advice on how to organize medium/large C++ projects.
Right now I'm working on a program that will uses classes from another
program I already wrote, a normal enough situation.  Currenlty I'm
using relative paths to point to the external objects, so my Makefile
looks like this:

<Makefile>

CXX=bcc32
CPPFLAGS=
EXTDIR=..\external_directory

OBJS=Main.obj WinDirectory.obj PixelDumpReader.obj \
CharsetFileCreator.obj \ 
$(EXTDIR)\Char.obj $(EXTDIR)\Charset.obj $(EXTDIR)\Point.obj 

all: $(OBJS)
        $(CXX) $(OBJS)

Main.obj : Main.cpp
        $(CXX) -c $(CPPFLAGS) $<

%.obj : %.cpp %.h
        $(CXX) -c $(CPPFLAGS) $<

</Makefile>

But to me this feels like a clunky and unscalable solution.  For
example, what happens when my program uses object files from 10
different directories?  What is the standard/proper way of handling
situations like the above?    

Thanks for any advice/references,
cpp


reply via email to

[Prev in Thread] Current Thread [Next in Thread]