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

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

parent ac5c00dc
*.d
*.o *.o
*.swp *.swp
moc-adapter moc-adapter
...@@ -27,6 +27,7 @@ CXXFLAGS+=-Wno-ignored-qualifiers ...@@ -27,6 +27,7 @@ CXXFLAGS+=-Wno-ignored-qualifiers
LDFLAGS=-L $(ALLJOYN_INSTALL_DIR)/lib -lalljoyn -lcrypto -lxml2 -pthread -luuid LDFLAGS=-L $(ALLJOYN_INSTALL_DIR)/lib -lalljoyn -lcrypto -lxml2 -pthread -luuid
DEV_PROVIDER_OBJS=$(patsubst %.cpp, %.o, $(SRCS)) DEV_PROVIDER_OBJS=$(patsubst %.cpp, %.o, $(SRCS))
OBJS=$(DEV_PROVIDER_OBJS) OBJS=$(DEV_PROVIDER_OBJS)
DEPS = $(OBJS:%.o=%.d)
ifeq ($V, 1) ifeq ($V, 1)
CXX_PRETTY = $(CXX) CXX_PRETTY = $(CXX)
...@@ -39,11 +40,12 @@ endif ...@@ -39,11 +40,12 @@ endif
all: moc-adapter all: moc-adapter
clean: clean:
$(RM) moc-adapter *.o DeviceProviders/*.o Bridge/*.o Common/*.o Adapters/MockAdapter/*.o \ $(RM) moc-adapter $(OBJS) $(DEPS)
ZigBeeAdapter/*.o
moc-adapter: $(OBJS) moc-adapter: $(OBJS)
$(LD_PRETTY) -o $@ $^ $(LDFLAGS) $(LD_PRETTY) -o $@ $^ $(LDFLAGS)
%.o: %.cpp %.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