source: branches/minix3-book/drivers/log/Makefile@ 20

Last change on this file since 20 was 4, checked in by Mattia Monga, 14 years ago

Importazione sorgenti libro

File size: 783 bytes
RevLine 
[4]1# Makefile for log driver
2DRIVER = log
3
4# directories
5u = /usr
6i = $u/include
7s = $i/sys
8m = $i/minix
9d = ..
10
11# programs, flags, etc.
12MAKE = exec make
13CC = exec cc
14CFLAGS = -I$i
15LDFLAGS = -i
16LIBS = -lsys -lsysutil
17
18OBJ = log.o diag.o kputc.o
19LIBDRIVER = $d/libdriver/driver.o
20
21
22# build local binary
23all build: $(DRIVER)
24$(DRIVER): $(OBJ) $(LIBDRIVER)
25 $(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBDRIVER) $(LIBS)
26 install -S 4kb $(DRIVER)
27
28$(LIBDRIVER):
29 cd $d/libdriver && $(MAKE)
30
31# install with other drivers
32install: /usr/sbin/$(DRIVER)
33/usr/sbin/$(DRIVER): $(DRIVER)
34 install -o root -cs $? $@
35
36# clean up local files
37clean:
38 rm -f $(DRIVER) *.o *.bak
39
40
41depend:
42 /usr/bin/mkdep "$(CC) -E $(CPPFLAGS)" *.c ../libdriver/*.c > .depend
43
44# Include generated dependencies.
45include .depend
46
Note: See TracBrowser for help on using the repository browser.