Rev 1962 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1962 | Rev 1968 | ||
---|---|---|---|
1 | include ../arch/$(ARCH)/Makefile.inc |
1 | include ../arch/$(ARCH)/Makefile.inc |
2 | 2 | ||
3 | sources=init.c |
3 | sources=init.c |
4 | 4 | ||
5 | CFLAGS+=-nostdinc -Ilibc -Werror-implicit-function-declaration -Wmissing-prototypes -Werror |
5 | CFLAGS+=-nostdinc -Ilibc -Werror-implicit-function-declaration -Wmissing-prototypes -Werror |
6 | 6 | ||
7 | objects:=$(addsuffix .o,$(basename $(sources))) |
7 | objects:=$(addsuffix .o,$(basename $(sources))) |
8 | 8 | ||
9 | .PHONY : all depend build clean dist-clean |
9 | .PHONY : all depend build clean dist-clean |
10 | 10 | ||
11 | all: dist-clean depend build |
11 | all: dist-clean depend build |
12 | 12 | ||
13 | -include Makefile.depend |
13 | -include Makefile.depend |
14 | 14 | ||
15 | depend: |
15 | depend: |
16 | $(CC) $(CFLAGS) -M $(sources) >Makefile.depend |
16 | $(CC) $(CFLAGS) -M $(sources) >Makefile.depend |
17 | 17 | ||
18 | build: init |
18 | build: init |
19 | 19 | ||
20 | clean: |
20 | clean: |
21 | find . -name '*.o' -maxdepth 1 -exec rm \{\} \; |
21 | find . -name '*.o' -maxdepth 1 -exec rm \{\} \; |
22 | -rm init |
22 | -rm init |
23 | 23 | ||
24 | dist-clean: |
24 | dist-clean: |
25 | -rm Makefile.depend |
25 | -rm Makefile.depend |
26 | -$(MAKE) clean |
26 | -$(MAKE) clean |
27 | 27 | ||
28 | init: $(objects) |
28 | init: $(objects) |
29 | $(LD) -T _link.ld -G 0 -static $(objects) libc/libc.a -o init |
29 | $(LD) -T _link.ld -G 0 -static $(objects) libc/libc.a -o init |
30 | 30 | ||
31 | %.o: %.c |
31 | %.o: %.c |
32 | $(CC) $(CFLAGS) -c $< -o $@ |
32 | $(CC) $(CFLAGS) -c $< -o $@ |
33 | 33 |