Commit 0408b799 authored by Alessandro Rubini's avatar Alessandro Rubini

Makefile: minor changes preparing for ppsi

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent a0d1be1c
......@@ -17,12 +17,13 @@ SIZE = $(CROSS_COMPILE)size
AUTOCONF = $(CURDIR)/include/generated/autoconf.h
PTP_NOPOSIX = ptp-noposix
PPSI = ppsi
# we miss CONFIG_ARCH_LM32 as we have no other archs by now
obj-y = arch/lm32/crt0.o arch/lm32/irq.o arch/lm32/debug.o
LDS = arch/lm32/ram.ld
obj-y += wrc_main.o wrc_ptp.o monitor/monitor.o
obj-y += wrc_main.o
obj-y += softpll/softpll_ng.o
......@@ -31,13 +32,11 @@ obj-y += softpll/softpll_ng.o
$(CC) -include $(AUTOCONF) -E -P $*.ld.S -o $@
cflags-y = -include $(AUTOCONF) -Iinclude -I. -Isoftpll
cflags-y = -ffreestanding -include $(AUTOCONF) -Iinclude -I. -Isoftpll
cflags-$(CONFIG_PP_PRINTF) += -I$(CURDIR)/pp_printf
cflags-$(CONFIG_PTP_NOPOSIX) += \
-ffreestanding \
-DPTPD_FREESTANDING \
-DWRPC_EXTRA_SLIM \
-DPTPD_MSBF \
......@@ -52,7 +51,9 @@ cflags-$(CONFIG_PTP_NOPOSIX) += \
-I$(PTP_NOPOSIX)/libptpnetif \
-I$(PTP_NOPOSIX)/PTPWRd
obj-$(CONFIG_PTP_NOPOSIX) += $(PTP_NOPOSIX)/PTPWRd/arith.o \
obj-$(CONFIG_PTP_NOPOSIX) += wrc_ptp.o \
monitor/monitor.o \
$(PTP_NOPOSIX)/PTPWRd/arith.o \
$(PTP_NOPOSIX)/PTPWRd/bmc.o \
$(PTP_NOPOSIX)/PTPWRd/dep/msg.o \
$(PTP_NOPOSIX)/PTPWRd/dep/net.o \
......@@ -93,7 +94,7 @@ REVISION=$(shell git describe --dirty --always)
all: tools $(OUTPUT).ram $(OUTPUT).vhd
.PRECIOUS: %.elf %.bin
.PHONY: all tools clean gitmodules
.PHONY: all tools clean gitmodules $(PPSI)/ppsi.o
$(OUTPUT).elf: $(LDS) $(AUTOCONF) gitmodules $(OUTPUT).o
$(CC) $(CFLAGS) -DGIT_REVISION=\"$(REVISION)\" -c revision.c
......@@ -123,6 +124,7 @@ include/board.h:
clean:
rm -f $(OBJS) $(OUTPUT).elf $(OUTPUT).bin $(OUTPUT).ram include/board.h
$(MAKE) -C $(PPSI) clean
%.o: %.c
${CC} $(CFLAGS) $(PTPD_CFLAGS) $(INCLUDE_DIR) $(LIB_DIR) -c $*.c -o $@
......
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