Rev 491 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
447 | decky | 1 | include ../../arch/$(ARCH)/Makefile.inc |
2 | |||
3 | sources=libc.c \ |
||
4 | entry.s |
||
5 | |||
6 | CFLAGS+=-nostdinc -I. -Werror-implicit-function-declaration -Wmissing-prototypes -Werror |
||
7 | |||
8 | objects:=$(addsuffix .o,$(basename $(sources))) |
||
9 | |||
10 | .PHONY : all depend build clean dist-clean |
||
11 | |||
12 | all: dist-clean depend build |
||
13 | |||
14 | -include Makefile.depend |
||
15 | |||
16 | depend: |
||
17 | $(CC) $(CFLAGS) -M $(sources) >Makefile.depend |
||
18 | |||
19 | build: libc.a |
||
20 | |||
21 | clean: |
||
22 | find . -name '*.o' -exec rm \{\} \; |
||
23 | -rm libc.a |
||
24 | |||
25 | dist-clean: |
||
26 | -rm Makefile.depend |
||
27 | -$(MAKE) clean |
||
28 | |||
29 | libc.a: $(objects) |
||
30 | $(AR) rc libc.a $(objects) |
||
31 | |||
32 | %.o: %.s |
||
33 | $(AS) $(ASFLAGS) $< -o $@ |
||
34 | |||
35 | %.o: %.c |
||
36 | $(CC) $(CFLAGS) -c $< -o $@ |