1,5 → 1,5 |
# |
# Copyright (c) 2005 Martin Decky |
# Copyright (c) 2009 Lukas Mejdrech |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
26,55 → 26,23 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
|
## Setup toolchain |
# |
NAME = networking_startup |
|
LIBC_PREFIX = ../../../../lib/libc |
SOFTINT_PREFIX = ../../../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
NET_BASE = ../../ |
STRUCTURES = $(NET_BASE)structures/ |
|
include ../../../../../Makefile.config |
|
LIBS = $(LIBC_PREFIX)/libc.a |
|
## Sources |
# |
|
OUTPUT = networking_startup |
OUTPUT = $(NAME) |
SOURCES = \ |
networking_startup.c \ |
../../modules.c \ |
../../self_test.c \ |
../../structures/measured_strings.c |
$(NAME).c \ |
$(NET_BASE)modules.c \ |
$(NET_BASE)self_test.c \ |
$(STRUCTURES)measured_strings.c |
|
DEFS += -D NETWORKING_$(NETWORKING) |
NET_DEFS += -D NETWORKING_$(NETWORKING) |
|
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
|
.PHONY: all clean depend disasm |
|
all: $(OUTPUT) $(OUTPUT).disasm |
|
-include Makefile.depend |
|
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
|
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
|
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
|
disasm: $(OUTPUT).disasm |
|
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< >$@ |
|
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
|
%.o: %.s |
$(AS) $(AFLAGS) $< -o $@ |
|
%.o: %.c |
$(CC) $(DEFS) $(CFLAGS) -c $< -o $@ |
include $(NET_BASE)Makefile.module |