Subj : Re: resource files To : borland.public.cpp.borlandcpp From : Ed Mulroy [TeamB] Date : Mon Nov 22 2004 03:15 pm Just for the heck of it, here is a real, working make file from a project I did. It allows you to specify -DNODEBUG and/or -DDYNAMIC on the command line to make.exe. That means it can be used to build the program as any of static or dynamic linked, with or without debuging info. It is set up to default to static linked with debug info enabled. It creates a response file - the 'copy' command copies everything between the '|' in '&&|' and the next '|' into the response file. That response file is then shown to the user and fed to the linker. By doing it that way 1-You still see the full linker command, something that doesn't happen if that style of indirection is done in the normal fashion 2-no matter how many object files and libraries you used there is no issue of the command getting too long for the command line (a serious issue on Win95/98/ME). It also tells you what the options were in what it built, uses precompiled header files and shows you the size of the executable it creates. .. Ed -------------- ..autodepend !ifdef NODEBUG DBG= MSG1=Debug Off !else DBG=/v MSG1=Debug On !endif !ifdef DYNAMIC LIBS=import32 cw32i CTARGTYPE=-WR MSG2=Dynamic Linked !else LIBS=import32 cw32 CTARGTYPE=-W MSG2=Static Linked !endif OBJS=utils.obj plist12.obj classes.obj plist12.exe : $(OBJS) plist.res copy &&| /Tpe/aa/x/c$(DBG) c0w32 $(OBJS),plist12,,import32 \ cw32,,plist.res | plist12.rsp @echo ilink32 @type plist12.rsp @ilink32 @plist12.rsp @del plist12.rsp>nul @echo ::: $(MSG1) @echo ::: $(MSG2) @dir plist12.exe plist.res : plist.rc plist.rh plist.ico brcc32 plist ..cpp.obj : bcc32 -c $(CTARGTYPE) -H="plist2.csm" $(DBG) { $< } -------------- >Jack Sawatzky wrote: >Thanks Ed. The make file did the trick! >Also, I like the idea of make files, now that have >one that works. >Thanks again. .