source: trunk/minix/drivers/memory/Makefile@ 10

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

Minix 3.1.2a

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