#17 Add BaseCommon

pull/32/head
Geoffrey Merck 4 years ago
parent afe9995141
commit 1a20ce5443

10
.vscode/tasks.json vendored

@ -12,7 +12,10 @@
"ENABLE_DEBUG=1",
"USE_GPSD=1"
],
"group": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
@ -25,10 +28,7 @@
"ENABLE_DEBUG=1",
"USE_GPSD=1"
],
"group": {
"kind": "build",
"isDefault": true
},
"group": "build",
"problemMatcher": []
}
]

@ -0,0 +1,12 @@
SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:.cpp=.o)
DEPS = $(SRCS:.cpp=.d)
BaseCommon.a: $(OBJS)
$(AR) rcs BaseCommon.a $(OBJS)
%.o : %.cpp
$(CC) $(CPPFLAGS) -MMD -MD -c $< -o $@
clean:
$(RM) *.o *.d BaseCommon.a

@ -45,11 +45,14 @@ DEPS = $(SRCS:.cpp=.d)
.PHONY: all
all: dstargateway
dstargateway : GitVersion.h $(OBJS)
$(CC) $(CPPFLAGS) -o dstargateway $(OBJS) $(LDFLAGS)
dstargateway : GitVersion.h $(OBJS) BaseCommon/BaseCommon.a
$(CC) $(CPPFLAGS) -o dstargateway $(OBJS) BaseCommon/BaseCommon.a $(LDFLAGS)
%.o : %.cpp
$(CC) $(CPPFLAGS) -MMD -MD -c $< -o $@
$(CC) -IBaseCommon/ $(CPPFLAGS) -MMD -MD -c $< -o $@
BaseCommon/BaseCommon.a: FORCE
$(MAKE) -C BaseCommon
GitVersion.h : FORCE
ifneq ("$(wildcard .git/index)","")
@ -71,8 +74,9 @@ endif
.PHONY: clean
clean:
@$(RM) GitVersion.h $(OBJS) $(DEPS) dstargateway
@$(MAKE) -C Tests clean
$(RM) GitVersion.h *.o *.d dstargateway
$(MAKE) -C Tests clean
$(MAKE) -C BaseCommon clean
-include $(DEPS)

Loading…
Cancel
Save

Powered by TurnKey Linux.