[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fed up with pattern rules ( make 3.79.1 on Redhat 8 Linux )
From: |
funtoosh |
Subject: |
Fed up with pattern rules ( make 3.79.1 on Redhat 8 Linux ) |
Date: |
25 Jun 2004 02:58:49 -0700 |
Hi
Consider this simple makefile :
SRC = a.c
SRC += b.c
DIROBJ = obj
DIRBIN = bin
PLATFORM = linux
OBJ := $(SRC:.c=.o)
OBJ := $(addprefix $(DIROBJ)/$(PLATFORM)/, $(OBJ))
$(DIROBJ)/$(PLATFORM)/%.o: %.c
@echo "running via pattern rule"
TARGET := run
target: $(DIRBIN) $(TARGET)
$(DIROBJ):
mkdir -p obj/linux
$(DIRBIN):
mkdir -p bin
$(TARGET): $(DIROBJ) $(OBJ)
@echo target
-----------------------------
make target
make: *** No rule to make target `obj/linux/a.o', needed by `run'.
Stop.
man page of makefile is nicely written but somehow doesnt answer why
the above error ?
Thanks
- Fed up with pattern rules ( make 3.79.1 on Redhat 8 Linux ),
funtoosh <=