Commit 3f8210e7 authored by Brendan Long's avatar Brendan Long

Fix 'make clean' and add automatic generation of .h dependencies.

parent ac5c00dc
*.d
*.o
*.swp
moc-adapter
......@@ -27,6 +27,7 @@ CXXFLAGS+=-Wno-ignored-qualifiers
LDFLAGS=-L $(ALLJOYN_INSTALL_DIR)/lib -lalljoyn -lcrypto -lxml2 -pthread -luuid
DEV_PROVIDER_OBJS=$(patsubst %.cpp, %.o, $(SRCS))
OBJS=$(DEV_PROVIDER_OBJS)
DEPS = $(OBJS:%.o=%.d)
ifeq ($V, 1)
CXX_PRETTY = $(CXX)
......@@ -39,11 +40,12 @@ endif
all: moc-adapter
clean:
$(RM) moc-adapter *.o DeviceProviders/*.o Bridge/*.o Common/*.o Adapters/MockAdapter/*.o \
ZigBeeAdapter/*.o
$(RM) moc-adapter $(OBJS) $(DEPS)
moc-adapter: $(OBJS)
$(LD_PRETTY) -o $@ $^ $(LDFLAGS)
%.o: %.cpp
$(CXX_PRETTY) $(CXXFLAGS) -c -o $@ $<
$(CXX_PRETTY) $(CXXFLAGS) -MMD -c -o $@ $<
-include $(DEPS)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment