-
Notifications
You must be signed in to change notification settings - Fork 0
/
Make.rules
33 lines (26 loc) · 957 Bytes
/
Make.rules
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
OBJ_DIR=./obj
WPI_DIR=$(TOP_DIR)/rbmj-wpilib
VXSIM_DIR=$(TOP_DIR)/vxsim
TESTHARNESS_DIR=$(TOP_DIR)/testharness
WX_CFLAGS=`wx-config --cxxflags`
WX_LDFLAGS=`wx-config --libs`
VXSIM_INCLUDES=-isystem $(VXSIM_DIR) -I $(VXSIM_DIR)
HACK_INCLUDES=-include $(VXSIM_DIR)/basetsd.h -include $(VXSIM_DIR)/hack.h
WPI_CFLAGS=-I $(WPI_DIR) -I $(WPI_DIR)/NetworkCommunication -I $(WPI_DIR)/ChipObject -I $(WPI_DIR)/CAN
WPILIB=$(WPI_DIR)/obj/wpilib.a
VXSIMLIB=$(VXSIM_DIR)/obj/vxsim.a
GUITESTLIB=$(TESTHARNESS_DIR)/obj/testgui.a
CONSOLETESTLIB=$(TESTHARNESS_DIR)/obj/testconsole.a
CFLAGS=-g -Wall
.PHONY: subdirs $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C "$@" $(MAKECMDGOALS)
.PHONY: clean
clean: subdirs
rm -f obj/*
.PHONY: depend
depend: subdirs
makedepend -Y -pobj/ $(WPI_CFLAGS) -I $(VXSIM_DIR) $(EXTRA_CFLAGS) $(SOURCES)
obj/%.o: %.cpp
g++ $(CFLAGS) $(WX_CFLAGS) $(WPI_CFLAGS) $(HACK_INCLUDES) $(VXSIM_INCLUDES) $(EXTRA_CFLAGS) -o "$@" -c "$<"