]> git.saurik.com Git - apple/boot.git/blame - i386/testmodule/Makefile
boot-132.tar.gz
[apple/boot.git] / i386 / testmodule / Makefile
CommitLineData
14c7c974
A
1
2# Makefile for i386 boot program
3# define FLOPPY and SMALL using DEFINES macro as necessary
4
5DIR = testmodule
6include ../MakePaths.dir
7
8DEBUG = -g
bba600dd 9OPTIM = -Os -Oz
14c7c974
A
10CFLAGS = $(DEBUG) $(OPTIM) $(MORECPP) -arch i386 -Wmost -DTEST_INTERNAL_USER
11DEFINES=
12CONFIG = hd
13SYMDIR = $(SYMROOT)
14LIBSADIR = ../libsa
15LIBSAIODIR = ../libsaio
16UTILDIR = ../util
17INC = -I. -I.. -I$(SYMDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR)
18ifneq "" "$(wildcard /bin/mkdirs)"
19 MKDIRS = /bin/mkdirs
20else
21 MKDIRS = /bin/mkdir -p
22endif
23AS = as
24LD = ld
25
26LIBSA = $(SYMDIR)/libsa.a
27LIBSAIO = $(SYMDIR)/libsaio.a
28LIBS = $(LIBSAIO) $(LIBSA)
29
30OTHER_FILES =
31
32INSTALLDIR = $(DSTROOT)/usr/standalone/i386
33
34VPATH = $(OBJROOT):$(SYMROOT)
35
36OBJS = test.o test_table.o
37
38UTILDIR = ../util
39SFILES = boot2.s
40CFILES = boot.c load.c stringTable.c graphics.c browser.c \
41 button.c scrollbar.c prompt.c
42HFILES = kernBootStruct.h
43OTHERFILES = Makefile machOconv.c README
44ALLSRC = $(FOREIGNSRC) $(FOREIGNBIN) $(SFILES) $(CFILES) \
45 $(HFILES) $(OTHERFILES)
46DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
47BOOT2ADDR = 3000
48
49SIG = $(SYMROOT)/sig
50GENFILES = $(SYMROOT)/install_internal.h \
51 $(SYMROOT)/install_external.h \
52 $(SYMROOT)/install_table.c \
53 $(SYMROOT)/install_defs.h
54
55all: $(DIRS_NEEDED) test_external.h test.module
56
57test.module: $(SYMROOT) $(OBJS)
58 $(CC) $(COPTS) $(CFLAGS) $(RC_CFLAGS) -o $@ \
59 $(OBJS) \
60 -e _test_entry -u _test_entry \
61 -seg1addr 50000 -preload -nostdlib $(LIBS)
62
63test_internal.h: test_external.h
64test_table.c: test_external.h
65test_defs.h: test_external.h
66test_external.h: test.def
67 $(SIG) -d $(SYMROOT) test.def
68
69install_i386:: all $(INSTALLDIR)
70 cp $(SYMROOT)/boot $(OTHER_FILES) $(INSTALLDIR)
71 cd $(INSTALLDIR); chmod u+w boot $(OTHER_FILES)
72
73clean::
74 rm -f $(SYMROOT)/boot.sys $(GENFILES)
75
76include ../MakeInc.dir
77
78#dependencies
79-include $(OBJROOT)/Makedep