forked from Mars999/regal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.expat
55 lines (39 loc) · 1.06 KB
/
Makefile.expat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
ifndef MAKEFILE_EXPAT_INCLUDED
MAKEFILE_EXPAT_INCLUDED := 1
.PHONY: expat.lib expat.clean
include build/common.inc
include build/expat.inc
#
# expat
#
ifneq ($(EXPAT.STATIC),)
all:: expat.lib
clean:: expat.clean
EXPAT.SRCS := $(EXPAT.C)
EXPAT.SRCS.NAMES := $(notdir $(EXPAT.SRCS))
EXPAT.OBJS := $(addprefix tmp/$(SYSTEM)/expat/static/,$(EXPAT.SRCS.NAMES))
EXPAT.OBJS := $(EXPAT.OBJS:.c=.o)
EXPAT.DEPS := $(EXPAT.DEPS:.o=.d)
-include $(EXPAT.DEPS)
ifeq ($(MODE),release)
EXPAT.CFLAGS += -DNDEBUG
endif
EXPAT.CFLAGS += -DHAVE_MEMMOVE
expat.lib: lib/$(SYSTEM)/$(EXPAT.STATIC)
expat.clean:
$(RM) -r tmp/$(SYSTEM)/expat/static
$(RM) -r lib/$(SYSTEM)/$(EXPAT.STATIC)
tmp/$(SYSTEM)/expat/static/%.o: src/expat/src/%.c
@mkdir -p $(dir $@)
$(LOG_CC)$(CCACHE) $(CC) $(EXPAT.CFLAGS) $(CFLAGS) $(PICFLAG) -o $@ -c $<
lib/$(SYSTEM)/$(EXPAT.STATIC): $(EXPAT.OBJS)
@mkdir -p $(dir $@)
$(LOG_AR)$(CCACHE) $(AR) cr $@ $(EXPAT.OBJS)
ifneq ($(RANLIB),)
$(LOG_RANLIB)$(RANLIB) $@
endif
ifneq ($(STRIP),)
$(LOG_STRIP)$(STRIP) -x $@
endif
endif
endif