lose -s flag for umount.
[minix.git] / kernel / Makefile
blob407731a77535b4c06bf9226dc08d4cd59f5c7f3b
1 # Makefile for kernel
3 include /etc/make.conf
5 # Directories
6 u = /usr
7 i = $u/include
8 l = $u/lib
9 s = system
10 a = arch/$(ARCH)
12 # Programs, flags, etc.
13 CC = exec cc
14 CPP = $l/cpp
15 LD = $(CC) -.o
16 CPPFLAGS=-I$i -I$a/include
17 CFLAGS=$(CPROFILE) $(CPPFLAGS) $(EXTRA_OPTS)
18 LDFLAGS=-i
20 # first-stage, arch-dependent startup code
21 HEAD = $a/mpx386.o
23 OBJS = start.o table.o main.o proc.o \
24 system.o clock.o utility.o debug.o profile.o interrupt.o
25 SYSTEM = system.a
26 ARCHLIB = $a/$(ARCH).a
27 LIBS = -ltimers -lsys
29 # What to make.
30 all: build
31 kernel build install: $(OBJS)
32 cd system && $(MAKE) $@
33 cd $a && $(MAKE) $@
34 $(LD) $(CFLAGS) $(LDFLAGS) -o kernel $(HEAD) $(OBJS) \
35 $(SYSTEM) $(ARCHLIB) $(LIBS)
36 install -S 0 kernel
38 clean:
39 cd system && $(MAKE) -$(MAKEFLAGS) $@
40 cd $a && $(MAKE) -$(MAKEFLAGS) $@
41 rm -f *.a *.o *~ *.bak kernel
43 depend:
44 cd system && $(MAKE) -$(MAKEFLAGS) $@
45 cd $a && $(MAKE) $@
46 mkdep "$(CC) -E $(CPPFLAGS)" *.c > .depend
48 # How to build it
49 .c.o:
50 $(CC) $(CFLAGS) -c -o $@ $<
52 # Include generated dependencies.
53 include .depend