]> git.saurik.com Git - apple/xnu.git/blame - SETUP/config/Makefile
xnu-3789.1.32.tar.gz
[apple/xnu.git] / SETUP / config / Makefile
CommitLineData
6d2010ae
A
1export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5
6d2010ae
A
6include $(MakeInc_cmd)
7include $(MakeInc_def)
8
fe8ab488
A
9OBJS = externs.o main.o mkheaders.o mkioconf.o mkmakefile.o \
10 openp.o searchp.o lexer.yy.o parser.o
6d2010ae 11
39236c6e 12CFLAGS = -isysroot $(HOST_SDKROOT) -mmacosx-version-min=$(HOST_OS_VERSION) -g -O0 -I$(SOURCE) -I.
fe8ab488 13CFLAGS += -DYY_NO_INPUT
6d2010ae
A
14
15WARNFLAGS = -Wall
16
39236c6e 17LDFLAGS = -isysroot $(HOST_SDKROOT) -mmacosx-version-min=$(HOST_OS_VERSION)
6d2010ae
A
18
19config: $(OBJS)
39037602 20 @echo "$(ColorH)HOST_LD$(Color0) $(ColorF)$@$(Color0)"
39236c6e 21 $(_v)$(HOST_CC) $(LDFLAGS) -o $@ $^
39037602 22 @echo "$(ColorH)HOST_CODESIGN$(Color0) $(ColorF)$@$(Color0)"
39236c6e 23 $(_v)env CODESIGN_ALLOCATE=$(HOST_CODESIGN_ALLOCATE) $(HOST_CODESIGN) -s - $@
6d2010ae 24
39236c6e 25%.o: %.c
39037602 26 @echo "$(ColorH)HOST_CC$(Color0) $(ColorF)$@$(Color0)"
39236c6e 27 $(_v)$(HOST_CC) $(WARNFLAGS) $(CFLAGS) -c -o $@ $<
6d2010ae
A
28
29parser.c: parser.y
39037602 30 @echo "$(ColorH)HOST_BISON$(Color0) $(ColorF)$@$(Color0)"
39236c6e 31 $(_v)$(HOST_BISON) -y -d -d -o $@ $<
6d2010ae
A
32
33lexer.yy.c: lexer.l
39037602 34 @echo "$(ColorH)HOST_FLEX$(Color0) $(ColorF)$@$(Color0)"
39236c6e 35 $(_v)env M4=$(HOST_GM4) $(HOST_FLEX) --header-file=lexer.yy.h -o $@ $<
6d2010ae 36
fe8ab488 37main.o mkheaders.o mkioconf.o mkmakefile.o lexer.yy.c: parser.c
6d2010ae 38
39236c6e 39do_build_setup:: config
6d2010ae
A
40
41include $(MakeInc_rule)
42include $(MakeInc_dir)