-
Notifications
You must be signed in to change notification settings - Fork 0
/
host_rules.inc
40 lines (32 loc) · 1.08 KB
/
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
36
37
38
39
40
# Host GCC rules for tools
HOSTCC=gcc
HOSTAR=ar
HOSTCFLAGS=-g -O2 -Wall -DBUILD_NUMBER=\"$(BUILD_NUMBER)\" -I$(modules)
ifdef OPT_WARNINGS
ifeq ($(GCC_VERSION_MAJOR),3)
HOSTCFLAGS+=-Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter
endif
ifeq ($(GCC_VERSION_MAJOR),4)
#HOSTCFLAGS+=-Wextra -fdiagnostics-show-option -Wno-missing-field-initializers -Wunused -Wno-unused-parameter
endif
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: ;