]>
Commit | Line | Data |
---|---|---|
327f7a02 WD |
1 | ########################################################################## |
2 | # | |
3 | # makefile_pc for use with PC mksnt tools dink32/drivers/i2c | |
4 | # | |
5 | # Copyright Motorola, Inc. 1997 | |
6 | # ALL RIGHTS RESERVED | |
7 | # | |
8 | # You are hereby granted a copyright license to use, modify, and | |
9 | # distribute the SOFTWARE so long as this entire notice is retained | |
10 | # without alteration in any modified and/or redistributed versions, | |
11 | # and that such modified versions are clearly identified as such. | |
12 | # No licenses are granted by implication, estoppel or otherwise under | |
13 | # any patents or trademarks of Motorola, Inc. | |
14 | # | |
15 | # The SOFTWARE is provided on an "AS IS" basis and without warranty. | |
16 | # To the maximum extent permitted by applicable law, MOTOROLA DISCLAIMS | |
17 | # ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED | |
18 | # WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR | |
19 | # PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH | |
20 | # REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS | |
21 | # THEREOF) AND ANY ACCOMPANYING WRITTEN MATERIALS. | |
22 | # | |
23 | # To the maximum extent permitted by applicable law, IN NO EVENT SHALL | |
24 | # MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER | |
25 | # (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF | |
26 | # BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS | |
27 | # INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OF THE USE OR | |
28 | # INABILITY TO USE THE SOFTWARE. | |
29 | # | |
30 | ############################################################################ | |
31 | TARGET = libi2c.a | |
32 | ||
33 | #DEBUG = -g | |
34 | DEBUG = -DI2CDBG | |
35 | LST = -Hanno -S | |
36 | OPTIM = | |
37 | CC = m:/old_tools/tools/hcppc/bin/hcppc | |
38 | CFLAGS = -Hnocopyr -c -Hsds -Hon=Char_default_unsigned -Hon=Char_is_rep -I../inc -I/risc/tools/pkgs/metaware/inc | |
39 | CCobj = $(CC) $(CFLAGS) $(DEBUG) $(OPTIM) | |
40 | PREP = $(CC) $(CFLAGS) -P | |
41 | ||
42 | # Assembler used to build the .s files (for the board version) | |
43 | ||
44 | ASOPT = -big_si -c | |
45 | ASDEBUG = -l -fm | |
46 | AS = m:/old_tools/tools/hcppc/bin/asppc | |
47 | ||
48 | # Linker to bring .o files together into an executable. | |
49 | ||
50 | LKOPT = -Bbase=0 -q -Qn -r | |
51 | LKCMD = | |
52 | LINK = m:/old_tools/tools/hcppc/bin/ldppc $(LKCMD) $(LKOPT) | |
53 | ||
54 | # DOS Utilities | |
55 | ||
56 | DEL = rm | |
57 | COPY = cp | |
58 | LIST = ls | |
59 | ||
60 | OBJECTS = i2c1.o i2c2.o | |
61 | ||
62 | all: $(TARGET) | |
63 | ||
64 | objects: $(OBJECTS) | |
65 | ||
66 | $(TARGET): $(OBJECTS) | |
67 | $(LINK) $(OBJECTS) -o $@ | |
68 | ||
69 | clean: | |
70 | $(DEL) -f *.o *.i *.map *.lst $(TARGET) $(OBJECTS) | |
71 | ||
72 | .s.o: | |
73 | $(DEL) -f $*.i | |
74 | $(PREP) -Hasmcpp $< | |
75 | $(AS) $(ASOPT) $*.i | |
76 | # $(AS) $(ASOPT) $(ASDEBUG) $*.i > $*.lst | |
77 | ||
78 | .c.o: | |
79 | $(CCobj) $< | |
80 | ||
81 | .c.s: | |
82 | $(CCobj) $(LST) $< | |
83 | ||
84 | i2c1.o: i2c_export.h i2c.h i2c1.c | |
85 | $(CCobj) $< | |
86 | ||
87 | ||
88 | i2c2.o: i2c.h i2c2.s | |
89 | $(DEL) -f $*.i | |
90 | $(PREP) -Hasmcpp $< | |
91 | $(AS) $(ASOPT) $*.i |