can: fix Makefile to attend the different targets
General Makefile calls each API source without any specific target, this commit fixes the CAN Makefile to build without errors. Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
95243cf2de
commit
3f507e3116
|
|
@ -13,7 +13,6 @@
|
||||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
# PERFORMANCE OF THIS SOFTWARE.
|
# PERFORMANCE OF THIS SOFTWARE.
|
||||||
#
|
#
|
||||||
all: BINARYTX BINARYRX
|
|
||||||
|
|
||||||
BINARYTX := apix-can-send-example
|
BINARYTX := apix-can-send-example
|
||||||
BINARYRX := apix-can-recv-example
|
BINARYRX := apix-can-recv-example
|
||||||
|
|
@ -25,10 +24,13 @@ CFLAGS += -Wall -O0
|
||||||
CFLAGS += $(shell pkg-config --cflags libdigiapix)
|
CFLAGS += $(shell pkg-config --cflags libdigiapix)
|
||||||
LDLIBS += $(shell pkg-config --libs libdigiapix)
|
LDLIBS += $(shell pkg-config --libs libdigiapix)
|
||||||
|
|
||||||
BINARYTX: can-send-example.o
|
.PHONY: all
|
||||||
|
all: $(BINARIES)
|
||||||
|
|
||||||
|
$(BINARYTX): can-send-example.o
|
||||||
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $(BINARYTX)
|
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $(BINARYTX)
|
||||||
|
|
||||||
BINARYRX: can-recv-example.o
|
$(BINARYRX): can-recv-example.o
|
||||||
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $(BINARYRX)
|
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $(BINARYRX)
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
|
|
@ -36,9 +38,6 @@ install: $(BINARIES)
|
||||||
install -d $(DESTDIR)/usr/bin
|
install -d $(DESTDIR)/usr/bin
|
||||||
install -m 0755 $^ $(DESTDIR)/usr/bin/
|
install -m 0755 $^ $(DESTDIR)/usr/bin/
|
||||||
|
|
||||||
.PHONY: all
|
|
||||||
all: $(BINARYTX) $(BINARYRX)
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
-rm -f *.o $(BINARYTX) $(BINARYRX)
|
-rm -f *.o $(BINARIES)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue