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