]> git.saurik.com Git - apple/boot.git/blame - i386/MakeInc.dir
boot-132.tar.gz
[apple/boot.git] / i386 / MakeInc.dir
CommitLineData
14c7c974
A
1#
2# Common makefile targets.
3#
4# Define these variables (if desired) in directory makefiles:
5# DIRS_NEEDED
6# INSTALLDIR
7# SRCROOT
8#
9ifneq "" "$(wildcard /bin/mkdirs)"
10 MKDIRS = /bin/mkdirs
11else
12 MKDIRS = /bin/mkdir -p
13endif
14
15installsrc:: $(SRCROOT)
16 cp $(ALLSRC) $(SRCROOT)
17 cd $(SRCROOT); chmod a-w $(ALLSRC)
18
19install:: installhdrs
20 @if [ -z "$(RC_ARCHS)" -o -n "$(RC_i386)" ]; then \
21 $(MAKE) install_i386 OBJROOT=${OBJROOT} \
22 SYMROOT=${SYMROOT} DSTROOT=${DSTROOT} \
23 SRCROOT=${SRCROOT}; \
24 else \
25 echo i386 not selected - null build.; \
26 fi
27
28install_i386:: all
29
30installhdrs::
31
32clean::
33 /bin/rm -rf $(OBJROOT) *~
34
35.SUFFIXES: .s .i .c .o
36
37.c.o .m.o:
38 $(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \
39 -MD -dependency-file $(OBJROOT)/$*.d
40 md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
41
57c72a9a
A
42$(OBJROOT)/%.o: %.c
43 $(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \
44 -MD -dependency-file $(OBJROOT)/$*.d
45 md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
46
47$(OBJROOT)/%.o: %.m
48 $(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \
49 -MD -dependency-file $(OBJROOT)/$*.d
50 md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
51
14c7c974
A
52#.s.o:
53# cc $(INC) -E $< > $(OBJROOT)/$*.o2
54# $(AS) -o $(OBJROOT)/$@ $(OBJROOT)/$*.o2
55
56.s.o:
57 cc -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $<
58
57c72a9a
A
59$(OBJROOT)/%.o: %.s
60 cc -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $<
61
14c7c974
A
62$(DIRS_NEEDED) $(INSTALLDIR) $(SRCROOT):
63 $(MKDIRS) $@