Subversion Repositories HelenOS

Rev

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