Subversion Repositories HelenOS

Rev

Rev 3901 | Rev 4307 | 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 = arp
29
NAME = arp
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
 
33
 
40
## Sources
34
## Sources
41
#
35
#
42
 
36
 
43
OUTPUT = $(NAME)
37
OUTPUT = $(NAME)
44
SOURCES = \
38
SOURCES = \
45
	$(NAME)_module.c \
39
	$(NAME)_module.c \
46
	$(NAME).c \
40
	$(NAME).c \
47
	../../module.c \
41
	$(NET_BASE)module.c \
48
	../../modules.c \
42
	$(NET_BASE)modules.c \
49
	../../structures/char_map.c \
43
	$(STRUCTURES)char_map.c \
50
	../../structures/measured_strings.c \
44
	$(STRUCTURES)measured_strings.c \
51
	../../structures/packet/packet.c \
45
	$(STRUCTURES)packet/packet.c \
52
	../../structures/packet/packet_client.c
46
	$(STRUCTURES)packet/packet_client.c
53
 
-
 
54
DEFS += -D ARP_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
 
47
 
81
%.o: %.s
-
 
82
	$(AS) $(AFLAGS) $< -o $@
48
NET_DEFS += -D ARP_BUNDLE=1
83
 
49
 
84
%.o: %.c
-
 
85
	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
50
include $(NET_BASE)Makefile.module