delorie.com/archives/browse.cgi | search |
From: | james_w_miller AT my-deja DOT com |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | C++ Makefiles |
Date: | Wed, 18 Oct 2000 21:27:21 GMT |
Organization: | Deja.com - Before you buy. |
Lines: | 37 |
Message-ID: | <8sl4jh$i77$1@nnrp1.deja.com> |
NNTP-Posting-Host: | 204.151.168.41 |
X-Article-Creation-Date: | Wed Oct 18 21:27:21 2000 GMT |
X-Http-User-Agent: | Mozilla/4.0 (compatible; MSIE 4.01; Windows NT) |
X-Http-Proxy: | 1.0 x56.deja.com:80 (Squid/1.1.22) for client 204.151.168.41 |
X-MyDeja-Info: | XMYDJUIDjames_w_miller |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
I am trying to construct a makefile that has source files (*.cpp files) in a different directory then the Makefile. My question is if anyone knows if this is possible and if so -> how? My makefile follows: #Variables INCL= $(LOCAL_DEV_INCLUDE) STD_LIBS= -lsocket -lnsl SOURCES= \ source/TSocket.cpp \ source/Helloworld.cpp \ all: helloworld.cgi helloworld.cgi: Helloworld.o TSocket.o CC $(STD_LIBS) -o helloworld.cgi Helloworld.o TSocket.o # The following rules enables compliling cpp into .o's .SUFFIXES: $(SUFFIXES) .cpp .cpp.o: CC -w -I$(INCL) $(STD_LIBS) -c $(SOURCES) -o $*.o # The following tells make which files it must update TSocket.o: $(LOCAL_DEV_INCLUDE)/TSocket.h Helloworld.o: $(LOCAL_DEV_INCLUDE)/TSocket.h Sent via Deja.com http://www.deja.com/ Before you buy.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |