Commit 1b856d43 authored by Aurelio Colosimo's avatar Aurelio Colosimo

Makefile: move include of proto-ext Makefile after the one of arch

Some archs (e.g. wrs does) may need to force the usage of a specific
extension, so include extension Makefile after arch Makefile, so that
arch Makefile can modify PROTO_EXT env var.
Signed-off-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent 9952163a
......@@ -46,6 +46,12 @@ pp_printf/pp-printf.o: $(wildcard pp_printf/*.[ch])
$(MAKE) -C pp_printf pp-printf.o
endif
# We need this -I so <arch/arch.h> can be found
CFLAGS += -Iarch-$(ARCH)/include
# Include arch code. Each arch chooses its own time directory..
include arch-$(ARCH)/Makefile
# proto-standard is always included, as it provides default function
# so the extension can avoid duplication of code.
ifdef PROTO_EXT
......@@ -53,12 +59,6 @@ ifdef PROTO_EXT
endif
include proto-standard/Makefile
# We need this -I so <arch/arch.h> can be found
CFLAGS += -Iarch-$(ARCH)/include
# Include arch code. Each arch chooses its own time directory..
include arch-$(ARCH)/Makefile
# ...and the TIME choice sets the default operations
CFLAGS += -DDEFAULT_TIME_OPS=$(TIME)_time_ops
CFLAGS += -DDEFAULT_NET_OPS=$(TIME)_net_ops
......@@ -73,7 +73,7 @@ export CFLAGS
# libraries: see proto-standard/Makefile as an example.
$(TARGET).o: $(OBJ-y)
$(LD) -Map $(TARGET).map1 -r -o $@ $(OBJ-y) $(LIBS)
$(LD) -Map $(TARGET).map1 -r -o $@ $(OBJ-y) --start-group $(LIBS) --end-group
# Finally, "make clean" is expected to work
clean:
......
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