Subversion Repositories HelenOS

Rev

Rev 3886 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3886 Rev 3989
Line 1... Line 1...
1
#
1
#
2
# Copyright (c) 2005 Martin Decky
2
# Copyright (c) 2009 Lukas Mejdrech
3
# All rights reserved.
3
# All rights reserved.
4
#
4
#
5
# Redistribution and use in source and binary forms, with or without
5
# Redistribution and use in source and binary forms, with or without
6
# modification, are permitted provided that the following conditions
6
# modification, are permitted provided that the following conditions
7
# are met:
7
# are met:
Line 24... Line 24...
24
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
#
27
#
28
 
28
 
29
## Setup toolchain
29
NAME = networking_startup
30
#
-
 
31
 
30
 
32
LIBC_PREFIX = ../../../../lib/libc
31
NET_BASE = ../../
33
SOFTINT_PREFIX = ../../../../lib/softint
32
STRUCTURES = $(NET_BASE)structures/
34
include $(LIBC_PREFIX)/Makefile.toolchain
-
 
35
include ../../../../../Makefile.config
-
 
36
 
33
 
37
LIBS = $(LIBC_PREFIX)/libc.a
34
include ../../../../../Makefile.config
38
 
35
 
39
## Sources
36
## Sources
40
#
37
#
41
 
38
 
42
OUTPUT = networking_startup
39
OUTPUT = $(NAME)
43
SOURCES = \
40
SOURCES = \
44
	networking_startup.c \
41
	$(NAME).c \
45
	../../modules.c \
42
	$(NET_BASE)modules.c \
46
	../../self_test.c \
43
	$(NET_BASE)self_test.c \
47
	../../structures/measured_strings.c
44
	$(STRUCTURES)measured_strings.c
48
 
-
 
49
DEFS += -D NETWORKING_$(NETWORKING)
-
 
50
 
-
 
51
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-
 
52
 
-
 
53
.PHONY: all clean depend disasm
-
 
54
 
-
 
55
all: $(OUTPUT) $(OUTPUT).disasm
-
 
56
 
-
 
57
-include Makefile.depend
-
 
58
 
-
 
59
clean:
-
 
60
	-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend
-
 
61
 
-
 
62
depend:
-
 
63
	$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
-
 
64
 
-
 
65
$(OUTPUT): $(OBJECTS) $(LIBS)
-
 
66
	$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
-
 
67
 
-
 
68
disasm: $(OUTPUT).disasm
-
 
69
 
-
 
70
$(OUTPUT).disasm: $(OUTPUT)
-
 
71
	$(OBJDUMP) -d $< >$@
-
 
72
 
-
 
73
%.o: %.S
-
 
74
	$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
-
 
75
 
45
 
76
%.o: %.s
-
 
77
	$(AS) $(AFLAGS) $< -o $@
46
NET_DEFS += -D NETWORKING_$(NETWORKING)
78
 
47
 
79
%.o: %.c
-
 
80
	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
48
include $(NET_BASE)Makefile.module