Commit | Line | Data |
---|---|---|
4e827d10 | 1 | # @(#)Makefile 4.7 (Berkeley) %G% |
85c06d21 RH |
2 | # |
3 | # crt0 Normal C run time startoff | |
4 | # mcrt0 C run time start off for profiling, ``prof'' conventions | |
5 | # gcrt0 C run time start off for profiling, ``gprof'' conventions | |
6 | # | |
cfc30119 KM |
7 | DESTDIR= |
8 | OBJS= crt0.o mcrt0.o gcrt0.o mon.o gmon.o | |
2cd81dfc | 9 | |
2cd81dfc KM |
10 | all: ${OBJS} |
11 | ||
85c06d21 | 12 | install: ${OBJS} |
cfc30119 KM |
13 | mv crt0.o ${DESTDIR}/lib/crt0.o |
14 | mv mcrt0.o ${DESTDIR}/lib/mcrt0.o | |
15 | mv gcrt0.o ${DESTDIR}/usr/lib/gcrt0.o | |
16 | ||
17 | crt0.o: crt0.c | |
18 | cc -S ${DFLAGS} -DCRT0 crt0.c | |
19 | /lib/cpp crt0.s > x.s | |
20 | as -o x.o x.s | |
21 | ld -x -r -o crt0.o x.o | |
22 | rm -f x.s x.o crt0.s | |
23 | ||
24 | moncrt0.o: crt0.c | |
25 | cc -S ${DFLAGS} -DMCRT0 crt0.c | |
26 | /lib/cpp crt0.s > x.s | |
27 | as -o x.o x.s | |
28 | ld -x -r -o moncrt0.o x.o | |
29 | rm -f x.s x.o crt0.s | |
30 | ||
31 | gcrt0.o: moncrt0.o gmon.o | |
32 | ld -x -r -o gcrt0.o moncrt0.o gmon.o | |
33 | ||
34 | mcrt0.o: moncrt0.o mon.o | |
35 | ld -x -r -o mcrt0.o moncrt0.o mon.o | |
36 | ||
4e827d10 | 37 | mon.o: mon.c mon.ex |
cfc30119 | 38 | cc -S ${DFLAGS} mon.c |
4e827d10 PK |
39 | ex - mon.s < mon.ex |
40 | as -o x.o mon.s | |
cfc30119 | 41 | ld -x -r -o mon.o x.o |
4e827d10 | 42 | rm -f x.o mon.s |
cfc30119 | 43 | |
4e827d10 | 44 | gmon.o: gmon.c gmon.h gmon.ex |
cfc30119 | 45 | cc -S ${DFLAGS} gmon.c |
4e827d10 PK |
46 | ex - gmon.s < gmon.ex |
47 | as -o x.o gmon.s | |
cfc30119 | 48 | ld -x -r -o gmon.o x.o |
4e827d10 | 49 | rm -f x.o gmon.s |
f26c4658 | 50 | |
2cd81dfc | 51 | clean: |
cfc30119 | 52 | rm -f ${OBJS} *.o *.s core errs |
83fb3681 | 53 | |
cfc30119 KM |
54 | lint: crt0.c |
55 | lint crt0.c -DMCRT0 | |
56 | lint crt0.c -DGCRT0 | |
57 | lint crt0.c -DCRT0 |