]> git.saurik.com Git - apple/boot.git/blob - i386/libsa/Makefile
boot-80.1.tar.gz
[apple/boot.git] / i386 / libsa / Makefile
1
2 DIR = libsa
3 include ../MakePaths.dir
4
5 UTILDIR = ../util
6 INSTALL_SA_DIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone
7 INSTALL_MD_DIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/machdep/i386
8
9 OPTIM = -Os
10 CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Wno-precomp \
11 -munaligned-text -static -traditional-cpp
12
13 INC = -I. -I$(SYMROOT) -I$(UTILDIR)
14 ifneq "" "$(wildcard /bin/mkdirs)"
15 MKDIRS = /bin/mkdirs
16 else
17 MKDIRS = /bin/mkdir -p
18 endif
19 AS = as
20 LD = ld
21 # LIBS= -lc_static
22 LIBS=
23
24 VPATH = $(OBJROOT):$(SYMROOT)
25
26 SA_OBJS = prf.o printf.o zalloc.o \
27 string.o strtol.o error.o \
28 setjmp.o qsort.o
29
30 SFILES = setjmp.s
31 CFILES = prf.c printf.c zalloc.c \
32 string.c strtol.c error.c \
33 qsort.c
34 HFILES = memory.h
35 EXPORTED_HFILES = libsa.h kernBootStruct.h memory.h
36 INSTALLED_SA_HFILES = libsa.h
37 INSTALLED_MD_HFILES = kernBootStruct.h
38 OTHERFILES = Makefile
39 ALLSRC = $(SFILES) $(CFILES) $(HFILES) $(OTHERFILES)
40 LIBS = libsa.a
41 DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
42
43 all: $(DIRS_NEEDED) $(LIBS)
44
45 libsa.a: $(SA_OBJS)
46 rm -f $(SYMROOT)/libsa.a
47 ar q $(SYMROOT)/libsa.a $(SA_OBJS)
48 ranlib $(SYMROOT)/libsa.a
49
50 clean::
51 rm -rf $(SYMROOT)/libsa.a $(SYMROOT)/libsaio.a
52
53 $(INSTALL_SA_DIR) $(INSTALL_MD_DIR):
54 $(MKDIRS) $@
55
56 installhdrs:: $(INSTALL_SA_DIR) $(INSTALL_MD_DIR)
57 cp $(INSTALLED_SA_HFILES) $(INSTALL_SA_DIR)
58 cp $(INSTALLED_MD_HFILES) $(INSTALL_MD_DIR)
59
60 include ../MakeInc.dir
61
62 # dependencies
63 -include $(OBJROOT)/Makedep