Rev | Line | |
---|
[9] | 1 | # Makefile for memory driver (MEMORY)
|
---|
| 2 | DRIVER = memory
|
---|
| 3 |
|
---|
| 4 | # directories
|
---|
| 5 | u = /usr
|
---|
| 6 | i = $u/include
|
---|
| 7 | s = $i/sys
|
---|
| 8 | m = $i/minix
|
---|
| 9 | b = $i/ibm
|
---|
| 10 | d = ..
|
---|
| 11 |
|
---|
| 12 | # programs, flags, etc.
|
---|
| 13 | MAKE = exec make
|
---|
| 14 | CC = exec cc
|
---|
| 15 | CFLAGS = -I$i
|
---|
| 16 | LDFLAGS = -i
|
---|
| 17 | LIBS = -lsys -lsysutil
|
---|
| 18 |
|
---|
| 19 | # imgrd_s.s is the ACK assembler version of the ramdisk. For more portability,
|
---|
| 20 | # use the C version imgrd.c. However, the C compiler takes too much memory
|
---|
| 21 | # compiling imgrd.c.
|
---|
| 22 | IMGRD=imgrd_s.o
|
---|
| 23 | #IMGRD=imgrd.c
|
---|
| 24 |
|
---|
| 25 | OBJ = memory.o $(IMGRD)
|
---|
| 26 | LIBDRIVER = $d/libdriver/driver.o
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | # build local binary
|
---|
| 30 | all build: $(DRIVER)
|
---|
| 31 |
|
---|
| 32 | $(DRIVER): ramdisk_image $(OBJ) $(LIBDRIVER)
|
---|
| 33 | $(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBDRIVER) $(LIBS)
|
---|
| 34 | install -S 8k $(DRIVER)
|
---|
| 35 |
|
---|
| 36 | imgrd.o: ramdisk/image.c
|
---|
| 37 | imgrd_s.o: ramdisk/image.s
|
---|
| 38 |
|
---|
| 39 | $(LIBDRIVER):
|
---|
| 40 | cd $d/libdriver && $(MAKE)
|
---|
| 41 |
|
---|
| 42 | ramdisk_image:
|
---|
| 43 | cd ramdisk && make
|
---|
| 44 |
|
---|
| 45 | # install with other drivers
|
---|
| 46 | install: /usr/sbin/$(DRIVER)
|
---|
| 47 | /usr/sbin/$(DRIVER): $(DRIVER)
|
---|
| 48 | install -o root -cs $? $@
|
---|
| 49 |
|
---|
| 50 | # clean up local files
|
---|
| 51 | clean:
|
---|
| 52 | rm -f $(DRIVER) *.o *.bak
|
---|
| 53 | cd ramdisk && make clean
|
---|
| 54 |
|
---|
| 55 | depend:
|
---|
| 56 | /usr/bin/mkdep "$(CC) -E $(CPPFLAGS)" memory.c ../libdriver/*.c > .depend
|
---|
| 57 | cd ramdisk && make depend
|
---|
| 58 |
|
---|
| 59 | # Include generated dependencies.
|
---|
| 60 | include .depend
|
---|
| 61 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.