unusual makefiles - problems with rules
- From: Zbigniew <zmk@xxxxxxxxx>
- Date: Mon, 30 Jul 2007 09:58:44 -0700
Hi,
I'm trying to compile my C++ code in such a way, that I get all .o
files directly to specified folder.
I want to avoid creation of .o files in current dir and then copy them
over to desired one.
Could someone please tell me, why the follwoing makefile does nothing?
make says: Nothing to be done for 'lib'
I do not have any .o files created...
#
# compile help modules used in .so and main server classes
# these modules are included in liasut.a library stored in ./output/
lib
# folder
# Include CPP, CC settings and others common flags
include ../make.conf.linux
..SUFFIXES : .o .cpp .c
CPPFLAGS= -c -I"../Include"
CFLAGS= -c -I"../Include"
CDEFS=
OUTL = ../output/Libs
..cpp.o:
@echo "C++ Libs source compilation $<"
@$(CPP) $(CPPFLAGS) $(CDEFS) $<
..c.$(OUTL)/%.o:
@echo "C Libs source compilation $*.c ==> $(OUTL)/$*.o"
@$(CC) $(CFLAGS) $(CDEFS) $*.c -o $(OUTL)/$*.o
$(OUTL)/%.cpp.$(OUTL)/%.o:
@echo "C++ Libs source compilation $*.cpp ==> $(OUTL)/$*.o"
@$(CPP) $(CPPFLAGS) $(CDEFS) $*.cpp -o $(OUTL)/$*.o
MODULES=$(OUTL)/AmaSocket.o \
$(OUTL)/DbgLIB.o
lib: $(MODULES)
# @echo "lib $?"
@echo "Done!"
clean:
@echo "Cleaning $(OUTL)/*.o ..."
@rm -f $(OUTL)/*.o *.o
@echo "Cleaned"
$(OUTL)/AmaSocket.o: AmaSocket.cpp
$(OUTL)/DbgLIB.o : DbgLIB.cpp DbgLIB.h Dbg.h
.
- Follow-Ups:
- Re: unusual makefiles - problems with rules
- From: toby
- Re: unusual makefiles - problems with rules
- From: toby
- Re: unusual makefiles - problems with rules
- Prev by Date: Re: Question about programming and project management
- Next by Date: Xlib and image from file (e.g. .bmp, .jpeg etc.)
- Previous by thread: Intel VTune 9.0 broken product?
- Next by thread: Re: unusual makefiles - problems with rules
- Index(es):
Relevant Pages
|