Subversion Repositories HelenOS

Rev

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

Rev 3901 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 26... Line 26...
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
NAME = ip
29
NAME = ip
30
 
30
 
31
## Setup toolchain
31
NET_BASE = ../../
32
#
-
 
33
 
-
 
34
LIBC_PREFIX = ../../../../lib/libc
-
 
35
SOFTINT_PREFIX = ../../../../lib/softint
32
STRUCTURES = $(NET_BASE)structures/
36
include $(LIBC_PREFIX)/Makefile.toolchain
-
 
37
 
-
 
38
LIBS = $(LIBC_PREFIX)/libc.a
-
 
39
 
-
 
40
## Sources
-
 
41
#
-
 
42
 
33
 
43
OUTPUT = $(NAME)
34
OUTPUT = $(NAME)
44
SOURCES = \
35
SOURCES = \
45
	$(NAME)_module.c \
36
	$(NAME)_module.c \
46
	$(NAME).c \
37
	$(NAME).c \
47
	../../module.c \
38
	$(NET_BASE)module.c \
48
	../../modules.c \
39
	$(NET_BASE)modules.c \
49
	../../structures/measured_strings.c \
40
	$(STRUCTURES)measured_strings.c \
50
	../../structures/packet/packet.c \
41
	$(STRUCTURES)packet/packet.c \
51
	../../structures/packet/packet_client.c \
42
	$(STRUCTURES)packet/packet_client.c \
52
	../../sockaddr.c
43
	$(NET_BASE)sockaddr.c
53
 
-
 
54
DEFS += -D IP_BUNDLE=1 -D $(NAME)_message=module_message -D $(NAME)_start_module=module_start -D $(NAME)_print_name=module_print_name
-
 
55
 
-
 
56
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-
 
57
 
-
 
58
.PHONY: all clean depend disasm
-
 
59
 
-
 
60
all: $(OUTPUT) $(OUTPUT).disasm
-
 
61
 
-
 
62
-include Makefile.depend
-
 
63
 
-
 
64
clean:
-
 
65
	-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend
-
 
66
 
-
 
67
depend:
-
 
68
	$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
-
 
69
 
-
 
70
$(OUTPUT): $(OBJECTS) $(LIBS)
-
 
71
	$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
-
 
72
 
-
 
73
disasm: $(OUTPUT).disasm
-
 
74
 
-
 
75
$(OUTPUT).disasm: $(OUTPUT)
-
 
76
	$(OBJDUMP) -d $< >$@
-
 
77
 
-
 
78
%.o: %.S
-
 
79
	$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
-
 
80
 
44
 
81
%.o: %.s
-
 
82
	$(AS) $(AFLAGS) $< -o $@
45
NET_DEFS += -D IP_BUNDLE=1
83
 
46
 
84
%.o: %.c
-
 
85
	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
47
include $(NET_BASE)Makefile.module