Makefile revision 1.1
1#	$NetBSD: Makefile,v 1.1 1996/08/25 23:39:14 jtk Exp $
2#
3# LP (Laptop Package)
4#
5# (C) 1994 by HOSOKAWA, Tatsumi <hosokawa@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@netbsd.org
17#
18
19DIR=${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
28CC = ${APMCC}
29LD = ${APMLD}
30STRIP = ${APMSTRIP}
31CFLAGS += -DINITIALIZER	-I${DIR} -DKERNEL \
32	${APMCFLAGS:S@-I.@-I${KERNREL}.@g}
33
34OBJS = apm_init.o real_prot.o table.o
35
36#.SUFFIXES: .c .S .o
37#
38#.c.o:
39#	$(CC)  $(CFLAGS) $(OPTFLAGS) $(INC) -c $<
40#
41.S.o:
42	$(CC)  $(CFLAGS) $(INC) -c $<
43
44apm_init.inc: apm_init Makefile
45	sh ${DIR}/bin2asm.sh apm_init > apm_init.inc
46
47apm_init: $(OBJS)
48	$(LD) -Bstatic -N -T 0 -o apm_init $(OBJS)
49	cp apm_init apm_init.sym
50	@${STRIP} apm_init
51	@sh ${DIR}/rmaouthdr apm_init apm_init.tmp
52	@mv -f apm_init.tmp apm_init
53
54#allclean: clean
55#	@rm -f apm_init.inc
56clean:
57	rm -f *.o apm_init apm_init.sym apm_init.inc
58
59#.include <bsd.prog.mk>
60