Makefile revision 1.2 1 # $NetBSD: Makefile,v 1.2 1996/08/30 02:32:13 jtk Exp $
2 #
3 # LP (Laptop Package)
4 #
5 # (C) 1994 by HOSOKAWA, Tatsumi <hosokawa (at] mt.cs.keio.ac.jp>
6 #
7 # This software may be used, modified, copied, and distributed in
8 # both source and binary form provided that the above copyright and
9 # these terms are retained. Under no circumstances is the author
10 # responsible for the proper functioning of this software, nor does
11 # the author assume any responsibility for damages incurred with its
12 # use.
13 #
14 # Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
15 # Oct., 1994 NetBSD port (1.0 BETA 10/2) by ukai
16 # Dec., 1995 NetBSD 1.1 kernel build retrofit, jtk (at] netbsd.org
17 #
18
19 DIR=${APMREL}${APMDIR}
20
21 .if exists (${DIR}/arch/${MACHINE_ARCH}/Makefile.inc)
22 .PATH: ${DIR}/arch/${MACHINE_ARCH}
23 .include "${DIR}/arch/${MACHINE_ARCH}/Makefile.inc"
24 .endif
25
26 .PATH: ${DIR}
27
28 CC = ${APMCC} -I. -I$S/arch -I$S
29 LD = ${APMLD}
30 STRIP = ${APMSTRIP}
31 CFLAGS += -DINITIALIZER -I${DIR} -DKERNEL \
32 ${APMCFLAGS:S@-I.@-I${KERNREL}.@g}
33
34 OBJS = apm_init.o real_prot.o table.o
35
36 $(OBJS): ${I386}/include/apmvar.h
37
38 #.SUFFIXES: .c .S .o
39 #
40 #.c.o:
41 # $(CC) $(CFLAGS) $(OPTFLAGS) $(INC) -c $<
42 #
43 .S.o:
44 $(CC) $(CFLAGS) $(INC) -c $<
45
46 apm_init.inc: apm_init Makefile
47 sh ${DIR}/bin2asm.sh apm_init > apm_init.inc
48
49 apm_init: $(OBJS)
50 $(LD) -Bstatic -N -T 0 -o apm_init $(OBJS)
51 cp apm_init apm_init.sym
52 @${STRIP} apm_init
53 @sh ${DIR}/rmaouthdr apm_init apm_init.tmp
54 @mv -f apm_init.tmp apm_init
55
56 #allclean: clean
57 # @rm -f apm_init.inc
58 clean:
59 rm -f *.o apm_init apm_init.sym apm_init.inc
60
61 #.include <bsd.prog.mk>
62