#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", "ENABLE_DEBUG=1",
"USE_GPSD=1" "USE_GPSD=1"
], ],
"group": "build", "group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [] "problemMatcher": []
}, },
{ {
@ -25,10 +28,7 @@
"ENABLE_DEBUG=1", "ENABLE_DEBUG=1",
"USE_GPSD=1" "USE_GPSD=1"
], ],
"group": { "group": "build",
"kind": "build",
"isDefault": true
},
"problemMatcher": [] "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 .PHONY: all
all: dstargateway all: dstargateway
dstargateway : GitVersion.h $(OBJS) dstargateway : GitVersion.h $(OBJS) BaseCommon/BaseCommon.a
$(CC) $(CPPFLAGS) -o dstargateway $(OBJS) $(LDFLAGS) $(CC) $(CPPFLAGS) -o dstargateway $(OBJS) BaseCommon/BaseCommon.a $(LDFLAGS)
%.o : %.cpp %.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 GitVersion.h : FORCE
ifneq ("$(wildcard .git/index)","") ifneq ("$(wildcard .git/index)","")
@ -71,8 +74,9 @@ endif
.PHONY: clean .PHONY: clean
clean: clean:
@$(RM) GitVersion.h $(OBJS) $(DEPS) dstargateway $(RM) GitVersion.h *.o *.d dstargateway
@$(MAKE) -C Tests clean $(MAKE) -C Tests clean
$(MAKE) -C BaseCommon clean
-include $(DEPS) -include $(DEPS)

Loading…
Cancel
Save

Powered by TurnKey Linux.