Commit 91c58a37 authored by Alessandro Rubini's avatar Alessandro Rubini

bugfix in Makefile: fix a build bug introduced by "three fixes"

Commit "5433fa2f Makefile: three fixes" introduced a bug, so that a
fresh clone fails to compile because of a missing "board.h" file.

This makes all objects depends on the symlink, which in turn is
removed by "make clean", so you don't need to start from a fresh clone
to experience the complete build.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>

Conflicts:

	Makefile
parent 66132ce4
......@@ -87,7 +87,6 @@ all: tools wrc
wrc: $(OBJS)
echo "const char *build_revision = \"$(REVISION)\";" > revision.c
echo "const char *build_date = __DATE__ \" \" __TIME__;" >> revision.c
ln -sf ../boards/$(BOARD)/board.h include/board.h
$(CC) $(CFLAGS) -c revision.c
$(SIZE) -t $(OBJS)
${CC} -o $(OUTPUT).elf revision.o $(OBJS) $(LDFLAGS)
......@@ -97,11 +96,17 @@ wrc: $(OBJS)
./tools/genraminit $(OUTPUT).bin 0 > $(OUTPUT).ram
./tools/genramvhd -s 90112 $(OUTPUT).bin > $(OUTPUT).vhd
$(OBJS): include/board.h
include/board.h:
ln -sf ../boards/$(BOARD)/board.h include/board.h
clean:
rm -f $(OBJS) $(OUTPUT).elf $(OUTPUT).bin $(OUTPUT).ram
rm -f $(OBJS) $(OUTPUT).elf $(OUTPUT).bin $(OUTPUT).ram include/board.h
%.o: %.c
$(CC) $(CFLAGS) $(PTPD_CFLAGS) $(INCLUDE_DIR) $(LIB_DIR) -c $^ -o $@
${CC} $(CFLAGS) $(PTPD_CFLAGS) $(INCLUDE_DIR) $(LIB_DIR) -c $*.c -o $@
tools:
make -C tools
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment