Subversion Repositories HelenOS

Rev

Rev 1962 | 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=libc.c \
3
sources=libc.c \
4
	entry.s
4
	entry.s
5
 
5
 
6
CFLAGS+=-nostdinc -I. -Werror-implicit-function-declaration -Wmissing-prototypes -Werror
6
CFLAGS+=-nostdinc -I. -Werror-implicit-function-declaration -Wmissing-prototypes -Werror
7
 
7
 
8
objects:=$(addsuffix .o,$(basename $(sources)))
8
objects:=$(addsuffix .o,$(basename $(sources)))
9
 
9
 
10
.PHONY : all depend build clean dist-clean
10
.PHONY : all depend build clean dist-clean
11
 
11
 
12
all: dist-clean depend build
12
all: dist-clean depend build
13
 
13
 
14
-include Makefile.depend
14
-include Makefile.depend
15
 
15
 
16
depend:
16
depend:
17
	$(CC) $(CFLAGS) -M $(sources) >Makefile.depend
17
	$(CC) $(CFLAGS) -M $(sources) >Makefile.depend
18
 
18
 
19
build: libc.a
19
build: libc.a
20
 
20
 
21
clean:
21
clean:
22
	find . -name '*.o' -exec rm \{\} \;
22
	find . -name '*.o' -exec rm \{\} \;
23
	-rm libc.a
23
	-rm libc.a
24
 
24
 
25
dist-clean:
25
dist-clean:
26
	-rm Makefile.depend
26
	-rm Makefile.depend
27
	-$(MAKE) clean
27
	-$(MAKE) clean
28
 
28
 
29
libc.a: $(objects)
29
libc.a: $(objects)
30
	$(AR) rc libc.a $(objects)
30
	$(AR) rc libc.a $(objects)
31
 
31
 
32
%.o: %.s
32
%.o: %.s
33
	$(AS) $(ASFLAGS) $< -o $@
33
	$(AS) $(ASFLAGS) $< -o $@
34
 
34
 
35
%.o: %.c
35
%.o: %.c
36
	$(CC) $(CFLAGS) -c $< -o $@
36
	$(CC) $(CFLAGS) -c $< -o $@
37
 
37