-
Notifications
You must be signed in to change notification settings - Fork 0
/
host_rules.inc
35 lines (27 loc) · 908 Bytes
/
host_rules.inc
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
# Host GCC rules for tools
HOSTCC=gcc
HOSTAR=ar
HOSTCFLAGS=-g -O2 -Wall -DBUILD_NUMBER=\"$(BUILD_NUMBER)\" -I$(modules)
ifdef OPT_WARNINGS
HOSTCFLAGS+=-Wextra -Wunused -Wno-missing-field-initializers -Wno-strict-overflow
endif
%.o: %.c
@echo $< '->' $@
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
%.o: $(modules)/%.c
@echo $< '->' $@
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
%.o: $(llua)/%.c
@echo $< '->' $@
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
.dep/%.d: %.c .dep
$(HOSTCC) $(HOSTCFLAGS) -MM $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
.dep/%.d: $(llua)/%.c .dep
$(HOSTCC) $(HOSTCFLAGS) -MM $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
# Define empty recipes for source files (including the makefiles)
# to prevent make from trying implicit rules to create them. Speeds up build process
$(topdir)host_rules.inc: ;