to do all the work. With that objective, is there an elegant
way to do than doing it as follow:
bld_dir = ../obj
$(bld_dir)/%.o: %.cpp
The above rule above creates all the object files in ../obj directory.
However using:
$(bin_dir)/%: %.cpp
gives the following error.
gnumake: *** No rule to make target `../bin/OneLevel_OneGlobal_SASD', needed by `build'. Stop.
The full makefile is shown below.
# $Source$
#
SYSTEMC = /prj/vlsi/scp/osci/systemc-2.0.1
bin_dir = ../bin
# Set the default variables
CC = g++
CXXFLAGS = -g -Wall -Wno-deprecated
TARGET_ARCH =
CPPFLAGS = -I$(SYSTEMC)/include \
#Libraries:
LDFLAGS=-g
LDLIBS = \
target_bus_models = \
OneLevel_OneGlobal_SASD.cpp
# Executables
TARGETS = $(target_bus_models:%.cpp=$(bin_dir)/%)
$(bin_dir)/%: %.cpp
# Build all targets
build: $(TARGETS)
# Clean directory
clean:
_______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make