Rev 3397 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3397 | Rev 3492 | ||
---|---|---|---|
Line 61... | Line 61... | ||
61 | LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld |
61 | LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld |
62 | OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy |
62 | OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy |
63 | OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump |
63 | OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump |
64 | endif |
64 | endif |
65 | 65 | ||
66 | CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mhard-float -mips3 |
66 | CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mhard-float -mips3 -pipe |
67 | 67 | ||
68 | ifdef REVISION |
68 | ifdef REVISION |
69 | CFLAGS += "-DREVISION=\"$(REVISION)\"" |
69 | CFLAGS += "-DREVISION=\"$(REVISION)\"" |
70 | endif |
70 | endif |
71 | 71 | ||
Line 94... | Line 94... | ||
94 | endif |
94 | endif |
95 | ifeq ($(RDFMT),fat) |
95 | ifeq ($(RDFMT),fat) |
96 | COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat |
96 | COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat |
97 | endif |
97 | endif |
98 | 98 | ||
99 | RD_TASKS = \ |
99 | RD_SRVS = \ |
100 | $(USPACEDIR)/srv/fb/fb \ |
100 | $(USPACEDIR)/srv/fb/fb \ |
101 | $(USPACEDIR)/srv/kbd/kbd \ |
101 | $(USPACEDIR)/srv/kbd/kbd \ |
102 | $(USPACEDIR)/srv/console/console \ |
102 | $(USPACEDIR)/srv/console/console \ |
103 | $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
103 | $(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
104 | $(USPACEDIR)/srv/fs/fat/fat \ |
104 | $(USPACEDIR)/srv/fs/fat/fat |
- | 105 | ||
- | 106 | RD_APPS = \ |
|
105 | $(USPACEDIR)/app/tetris/tetris \ |
107 | $(USPACEDIR)/app/tetris/tetris \ |
106 | $(USPACEDIR)/app/tester/tester \ |
108 | $(USPACEDIR)/app/tester/tester \ |
- | 109 | $(USPACEDIR)/app/trace/trace \ |
|
107 | $(USPACEDIR)/app/bdsh/bdsh \ |
110 | $(USPACEDIR)/app/bdsh/bdsh \ |
108 | $(USPACEDIR)/app/klog/klog |
111 | $(USPACEDIR)/app/klog/klog |
109 | 112 | ||
110 | - | ||
111 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
113 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
112 | COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) |
114 | COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) |
113 | 115 | ||
114 | .PHONY: all clean depend |
116 | .PHONY: all clean depend |
115 | 117 | ||
Line 119... | Line 121... | ||
119 | 121 | ||
120 | image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) |
122 | image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) |
121 | $(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ |
123 | $(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ |
122 | 124 | ||
123 | depend: |
125 | depend: |
124 | -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
126 | -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null |
125 | 127 | ||
126 | clean: |
128 | clean: |
- | 129 | -for file in $(RD_SRVS) ; do \ |
|
- | 130 | rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ |
|
- | 131 | done |
|
127 | -for task in $(RD_TASKS) ; do \ |
132 | -for file in $(RD_APPS) ; do \ |
128 | rm -f $(USPACEDIR)/dist/sbin/`basename $$task` ; \ |
133 | rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ |
129 | done |
134 | done |
130 | -rm -f _components.h _components.c _link.ld _link.ld.in $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend |
135 | -rm -f _components.h _components.c _link.ld _link.ld.in $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend |
131 | 136 | ||
132 | _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) _link.ld.in |
137 | _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in |
- | 138 | for file in $(RD_SRVS) ; do \ |
|
- | 139 | cp $$file $(USPACEDIR)/dist/srv/ ; \ |
|
- | 140 | done |
|
133 | for task in $(RD_TASKS) ; do \ |
141 | for file in $(RD_APPS) ; do \ |
134 | cp $$task $(USPACEDIR)/dist/sbin/ ; \ |
142 | cp $$file $(USPACEDIR)/dist/app/ ; \ |
135 | done |
143 | done |
136 | ifeq ($(RDFMT),tmpfs) |
144 | ifeq ($(RDFMT),tmpfs) |
137 | ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs |
145 | ../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs |
138 | endif |
146 | endif |
139 | ifeq ($(RDFMT),fat) |
147 | ifeq ($(RDFMT),fat) |