Subversion Repositories HelenOS

Rev

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 55... Line 55...
55
	LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
55
	LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
56
	OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
56
	OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
57
	OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
57
	OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
58
endif
58
endif
59
 
59
 
60
CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../../genarch -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc -msoft-float -m32
60
CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../../genarch -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc -msoft-float -m32 -pipe
61
 
61
 
62
ifdef REVISION
62
ifdef REVISION
63
	CFLAGS += "-DREVISION=\"$(REVISION)\""
63
	CFLAGS += "-DREVISION=\"$(REVISION)\""
64
endif
64
endif
65
 
65
 
Line 89... Line 89...
89
endif
89
endif
90
ifeq ($(RDFMT),fat)
90
ifeq ($(RDFMT),fat)
91
	COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat
91
	COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat
92
endif
92
endif
93
 
93
 
94
RD_TASKS = \
94
RD_SRVS = \
95
	$(USPACEDIR)/srv/fb/fb \
95
	$(USPACEDIR)/srv/fb/fb \
96
	$(USPACEDIR)/srv/kbd/kbd \
96
	$(USPACEDIR)/srv/kbd/kbd \
97
	$(USPACEDIR)/srv/console/console \
97
	$(USPACEDIR)/srv/console/console \
98
	$(USPACEDIR)/srv/fs/tmpfs/tmpfs \
98
	$(USPACEDIR)/srv/fs/tmpfs/tmpfs \
99
	$(USPACEDIR)/srv/fs/fat/fat \
99
	$(USPACEDIR)/srv/fs/fat/fat
-
 
100
 
-
 
101
RD_APPS = \
100
	$(USPACEDIR)/app/tetris/tetris \
102
	$(USPACEDIR)/app/tetris/tetris \
101
	$(USPACEDIR)/app/tester/tester \
103
	$(USPACEDIR)/app/tester/tester \
-
 
104
	$(USPACEDIR)/app/trace/trace \
102
	$(USPACEDIR)/app/klog/klog \
105
	$(USPACEDIR)/app/klog/klog \
103
	$(USPACEDIR)/app/bdsh/bdsh
106
	$(USPACEDIR)/app/bdsh/bdsh
104
 
107
 
105
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
108
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
106
COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS))))
109
COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS))))
Line 113... Line 116...
113
 
116
 
114
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS)
117
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS)
115
	$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@
118
	$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@
116
 
119
 
117
depend:
120
depend:
118
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
121
	-makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null
119
 
122
 
120
clean:
123
clean:
-
 
124
	-for file in $(RD_SRVS) ; do \
-
 
125
		rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \
-
 
126
	done
121
	-for task in $(RD_TASKS) ; do \
127
	-for file in $(RD_APPS) ; do \
122
		rm -f $(USPACEDIR)/dist/sbin/`basename $$task` ; \
128
		rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \
123
	done
129
	done
124
	-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend
130
	-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend
125
 
131
 
126
_components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_TASKS) _link.ld.in
132
_components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in
-
 
133
	for file in $(RD_SRVS) ; do \
-
 
134
		cp $$file $(USPACEDIR)/dist/srv/ ; \
-
 
135
	done
127
	for task in $(RD_TASKS) ; do \
136
	for file in $(RD_APPS) ; do \
128
		cp $$task $(USPACEDIR)/dist/sbin/ ; \
137
		cp $$file $(USPACEDIR)/dist/app/ ; \
129
	done
138
	done
130
ifeq ($(RDFMT),tmpfs)
139
ifeq ($(RDFMT),tmpfs)
131
	../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs
140
	../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs
132
endif
141
endif
133
ifeq ($(RDFMT),fat)
142
ifeq ($(RDFMT),fat)