Compare commits
1 Commits
66be59c7ee
...
d6fe8ec934
Author | SHA1 | Date | |
---|---|---|---|
|
d6fe8ec934 |
9
Makefile
9
Makefile
@ -13,12 +13,21 @@ UNIT_TEST_SRC_DIR = test/unit
|
||||
UNIT_TEST_OBJ_DIR = $(OBJ_DIR)/$(UNIT_TEST_SRC_DIR)
|
||||
|
||||
INCLUDES := inc
|
||||
|
||||
#Alpine Linux names libftdi libftdi1
|
||||
ifneq "$(findstring Alpine,$(shell head -1 /etc/issue))" ""
|
||||
INCLUDES += /usr/include/libftdi1
|
||||
endif
|
||||
|
||||
ifneq "$(findstring $(MAKECMDGOALS), build_unit_test exec_unit_test)" ""
|
||||
INCLUDES += test/inc
|
||||
else
|
||||
#Alpine Linux names libftdi libftdi1
|
||||
ifneq "$(findstring Alpine,$(shell head -1 /etc/issue))" ""
|
||||
LIBS := ftdi1
|
||||
else
|
||||
LIBS := ftdi
|
||||
endif
|
||||
endif
|
||||
|
||||
LD_FLAGS :=
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <time.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include <fff.h>
|
||||
#include <utest.h>
|
||||
@ -17,10 +16,10 @@ FAKE_VOID_FUNC(ftdi_free, struct ftdi_context *);
|
||||
FAKE_VALUE_FUNC(int, ftdi_usb_open, struct ftdi_context *, int, int);
|
||||
FAKE_VALUE_FUNC(int, ftdi_usb_close, struct ftdi_context *);
|
||||
FAKE_VALUE_FUNC(struct ftdi_context *, ftdi_new);
|
||||
FAKE_VALUE_FUNC(const char *, ftdi_get_error_string, struct ftdi_context *);
|
||||
FAKE_VALUE_FUNC(char *, ftdi_get_error_string, struct ftdi_context *);
|
||||
FAKE_VALUE_FUNC(int, ftdi_set_bitmode, struct ftdi_context *, unsigned char, unsigned char);
|
||||
FAKE_VALUE_FUNC(int, ftdi_read_data, struct ftdi_context *, unsigned char *, int);
|
||||
FAKE_VALUE_FUNC(int, ftdi_write_data, struct ftdi_context *, const unsigned char *, int);
|
||||
FAKE_VALUE_FUNC(int, ftdi_write_data, struct ftdi_context *, unsigned char *, int);
|
||||
|
||||
UTEST_MAIN();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user