Makefile 1.58 KB
Newer Older
jgladish's avatar
jgladish committed
1 2
SRCS=DeviceProviders/AllJoynProvider.cpp \
     DeviceProviders/AllJoynService.cpp \
gladish's avatar
gladish committed
3
     Bridge/AllJoynAbout.cpp \
gladish's avatar
gladish committed
4
     Bridge/AllJoynHelper.cpp \
5
     Bridge/Bridge.cpp \
6 7
     Bridge/BridgeConfig.cpp \
     Bridge/BridgeDevice.cpp \
gladish's avatar
gladish committed
8
     Bridge/ConfigManager.cpp \
gladish's avatar
gladish committed
9
     Bridge/DeviceMain.cpp \
gladish's avatar
gladish committed
10 11 12
     Bridge/DeviceMethod.cpp \
     Bridge/DeviceProperty.cpp \
     Bridge/DeviceSignal.cpp \
gladish's avatar
gladish committed
13
     Common/Log.cpp \
14
     Common/Variant.cpp \
gladish's avatar
gladish committed
15 16 17
     Adapters/MockAdapter/MockAdapter.cpp \
     Adapters/MockAdapter/MockDevices.cpp \
     Adapters/MockAdapter/MockAdapterDevice.cpp \
gladish's avatar
gladish committed
18
     Adapters/ZigBeeAdapter/ZigBeeAdapter.cpp \
gladish's avatar
gladish committed
19
     main.cpp
jgladish's avatar
jgladish committed
20

21
LIBXML_INC?=/usr/include/libxml2
22

23
ALLJOYN_INSTALL_DIR?=/Users/jgladi200/Work/alljoyn/alljoyn-15.09.00a-src/build/darwin/x86/debug/dist/cpp
jgladish's avatar
jgladish committed
24

25
CXXFLAGS=-D QCC_OS_GROUP_POSIX -Wall -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -Wno-ignored-qualifiers -std=c++0x -I. -I$(ALLJOYN_INSTALL_DIR)/inc -I$(LIBXML_INC)
26
LDFLAGS=-L $(ALLJOYN_INSTALL_DIR)/lib -lalljoyn -lcrypto -lxml2
27
DEV_PROVIDER_OBJS=$(patsubst %.cpp, %.o, $(SRCS))
jgladish's avatar
jgladish committed
28
OBJS=$(DEV_PROVIDER_OBJS)
29
DEPS = $(OBJS:%.o=%.d)
jgladish's avatar
jgladish committed
30

31 32 33 34 35
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S),Linux)
    LDFLAGS += -pthread -luuid
endif

36 37 38 39 40 41
ifeq ($(DEBUG), 1)
CXXFLAGS += -g
else
CXXFLAGS += -O2
endif

42 43 44 45 46 47 48 49
ifeq ($V, 1)
CXX_PRETTY = $(CXX)
LD_PRETTY = $(CXX)
else
CXX_PRETTY = @echo " [CXX] $<" ; $(CXX)
LD_PRETTY = @echo "[LINK] $@" ; $(CXX)
endif

50
all: moc-adapter
jgladish's avatar
jgladish committed
51 52

clean:
53
	$(RM) moc-adapter $(OBJS) $(DEPS)
gladish's avatar
gladish committed
54

gladish's avatar
gladish committed
55
moc-adapter: $(OBJS)
56
	$(LD_PRETTY) -o $@ $^ $(LDFLAGS)
jgladish's avatar
jgladish committed
57

58
%.o: %.cpp
59 60 61
	$(CXX_PRETTY) $(CXXFLAGS) -MMD -c -o $@ $<

-include $(DEPS)