|
|
1.1 root 1: # Master makefile
2: # Use of GCC for compilations of DDI/DKI drivers caused by this makefile is
3: # strongly recommended. Comment out the following lines if you cannot use gcc
4: # for some reason. The default compiler is fine for the Space.c and conf.c
5: # files, though.
6:
7: CC=gcc
8: CFLAGS=-O2 -Wall -ansi -pedantic
9: CONFDIR=.
10:
11: all: drivers $(CONFDIR)/drvbld.mak configure
12:
13: # Update binaries of drivers and the 'devadm' program
14:
15: drivers:
16: j=$$CWD; for i in */src/[Mm]akefile; do \
17: if [ -f $$i ]; then \
18: DEVDIR=`expr $$i : '\(.*\)/.*'`; \
19: echo "$$DEVDIR"; \
20: cd $$DEVDIR; \
21: make CC="$(CC)" CFLAGS="$(CFLAGS)" || exit 1; \
22: cd $$j; \
23: fi; \
24: done
25:
26: # As a detail, we check to see that a device for major number 4 is installed,
27: # otherwise the kernel will be built without a console and will fail to be
28: # very useful.
29:
30: $(CONFDIR)/drvbld.mak: $(CONFDIR)/mdevice $(CONFDIR)/sdevice \
31: $(CONFDIR)/template.mak
32: bin/idcheck -i $(CONFDIR) -B -l 4; if [ $$? -gt 0 -a $$? -lt 100 ]; \
33: then exit 0; \
34: else echo "No console device configured"; exit 1;\
35: fi
36: CONFPATH=$$CWD bin/devadm -d -I $(CONFDIR)
37:
38: configure:
39: export CONFPATH=$$CWD; cd $(CONFDIR); \
40: make K386LIB=$(K386LIB) TARGET=$(TARGET) -f drvbld.mak
41:
42: clean: newconf
43: j=$$CWD; for i in */src/[Mm]akefile; do \
44: cd `expr $$i : '\(.*\)/.*'`; \
45: make clean || exit 1; \
46: cd $$j; \
47: done
48:
49: newconf:
50: rm -f $(CONFDIR)/drvbld.mak $(CONFDIR)/conf.c $(CONFDIR)/conf.h \
51: $(CONFDIR)/obj/*
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.