2005-07-08 19:23:44 +02:00
|
|
|
# Makefile for log driver
|
|
|
|
DRIVER = log
|
|
|
|
|
|
|
|
# directories
|
|
|
|
u = /usr
|
|
|
|
i = $u/include
|
|
|
|
s = $i/sys
|
|
|
|
m = $i/minix
|
|
|
|
d = ..
|
|
|
|
|
|
|
|
# programs, flags, etc.
|
|
|
|
MAKE = exec make
|
|
|
|
CC = exec cc
|
2006-10-30 16:53:38 +01:00
|
|
|
CFLAGS = -I$i $(CPROFILE)
|
2005-07-08 19:23:44 +02:00
|
|
|
LDFLAGS = -i
|
2006-10-30 16:53:38 +01:00
|
|
|
LIBS = -lsysutil -lsys
|
2005-07-08 19:23:44 +02:00
|
|
|
|
2005-07-21 20:29:52 +02:00
|
|
|
OBJ = log.o diag.o kputc.o
|
2005-07-08 19:23:44 +02:00
|
|
|
LIBDRIVER = $d/libdriver/driver.o
|
|
|
|
|
|
|
|
|
|
|
|
# build local binary
|
|
|
|
all build: $(DRIVER)
|
|
|
|
$(DRIVER): $(OBJ) $(LIBDRIVER)
|
|
|
|
$(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBDRIVER) $(LIBS)
|
2006-10-20 15:54:14 +02:00
|
|
|
install -S 16kb $(DRIVER)
|
2005-07-08 19:23:44 +02:00
|
|
|
|
|
|
|
$(LIBDRIVER):
|
|
|
|
cd $d/libdriver && $(MAKE)
|
|
|
|
|
|
|
|
# install with other drivers
|
2006-03-03 11:21:45 +01:00
|
|
|
install: $(DRIVER)
|
|
|
|
install -o root -cs $? /sbin/$(DRIVER)
|
2005-07-08 19:23:44 +02:00
|
|
|
|
|
|
|
# clean up local files
|
|
|
|
clean:
|
|
|
|
rm -f $(DRIVER) *.o *.bak
|
|
|
|
|
|
|
|
|
|
|
|
depend:
|
|
|
|
/usr/bin/mkdep "$(CC) -E $(CPPFLAGS)" *.c ../libdriver/*.c > .depend
|
|
|
|
|
|
|
|
# Include generated dependencies.
|
|
|
|
include .depend
|
|
|
|
|