Makefile revision 1.3 1 # $NetBSD: Makefile,v 1.3 1996/09/08 15:36:51 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 CFLAGS += -DINITIALIZER -I${DIR} -DKERNEL \
31 ${APMCFLAGS:S@-I.@-I${KERNREL}.@g}
32
33 OBJS = biostramp.o
34
35 $(OBJS): ${I386}/include/apmvar.h
36
37 #.SUFFIXES: .c .S .o
38 #
39 #.c.o:
40 # $(CC) $(CFLAGS) $(OPTFLAGS) $(INC) -c $<
41 #
42 .S.o:
43 $(CC) $(CFLAGS) $(INC) -c $<
44
45 DEPS=${APMDEPS}
46
47 biostramp.inc: biostramp Makefile
48 sh ${DIR}/bin2asm.sh biostramp > biostramp.inc
49
50 biostramp: $(OBJS) $(DEPS)
51 $(LD) -Bstatic -N -T 0 -o biostramp $(OBJS)
52 cp biostramp biostramp.sym
53 @${APMSTRIP} biostramp
54 @if [ `${LS} -l biostramp |awk '{print $$5}'` -gt 4096 ]; then \
55 echo "biostramp too big"; \
56 exit 1; \
57 fi
58 @sh ${DIR}/rmaouthdr biostramp biostramp.tmp
59 @mv -f biostramp.tmp biostramp
60
61 #allclean: clean
62 # @rm -f apm_init.inc
63 clean:
64 rm -f *.o biostramp biostramp.sym biostramp.inc
65
66 #.include <bsd.prog.mk>
67