summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.h157
-rw-r--r--src/make.mk20
2 files changed, 15 insertions, 162 deletions
diff --git a/src/config.h b/src/config.h
deleted file mode 100644
index 97a82c2..0000000
--- a/src/config.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to the attribute for default visibility. */
-#define DEFAULT_VISIBILITY __attribute__ ((visibility ("default")))
-
-/* Define to 1 to start with debug message logging enabled. */
-/* #undef ENABLE_DEBUG_LOGGING */
-
-/* Define to 1 to enable message logging. */
-#define ENABLE_LOGGING 1
-
-/* Define to 1 if you have the <asm/types.h> header file. */
-/* #undef HAVE_ASM_TYPES_H */
-
-/* Define to 1 if you have the `clock_gettime' function. */
-#define HAVE_CLOCK_GETTIME 1
-
-/* Define to 1 if you have the declaration of `EFD_CLOEXEC', and to 0 if you
- don't. */
-#define HAVE_DECL_EFD_CLOEXEC 1
-
-/* Define to 1 if you have the declaration of `EFD_NONBLOCK', and to 0 if you
- don't. */
-#define HAVE_DECL_EFD_NONBLOCK 1
-
-/* Define to 1 if you have the declaration of `TFD_CLOEXEC', and to 0 if you
- don't. */
-#define HAVE_DECL_TFD_CLOEXEC 1
-
-/* Define to 1 if you have the declaration of `TFD_NONBLOCK', and to 0 if you
- don't. */
-#define HAVE_DECL_TFD_NONBLOCK 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if the system has eventfd functionality. */
-#define HAVE_EVENTFD 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <IOKit/usb/IOUSBHostFamilyDefinitions.h> header
- file. */
-/* #undef HAVE_IOKIT_USB_IOUSBHOSTFAMILYDEFINITIONS_H */
-
-/* Define to 1 if you have the `udev' library (-ludev). */
-#define HAVE_LIBUDEV 1
-
-/* Define to 1 if the system has the type `nfds_t'. */
-#define HAVE_NFDS_T 1
-
-/* Define to 1 if you have the `pipe2' function. */
-#define HAVE_PIPE2 1
-
-/* Define to 1 if you have the `pthread_condattr_setclock' function. */
-#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
-
-/* Define to 1 if you have the `pthread_setname_np' function. */
-#define HAVE_PTHREAD_SETNAME_NP 1
-
-/* Define to 1 if you have the `pthread_threadid_np' function. */
-/* #undef HAVE_PTHREAD_THREADID_NP */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdio.h> header file. */
-#define HAVE_STDIO_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if the system has the type `struct timespec'. */
-/* #undef HAVE_STRUCT_TIMESPEC */
-
-/* Define to 1 if you have the `syslog' function. */
-/* #undef HAVE_SYSLOG */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if the system has timerfd functionality. */
-#define HAVE_TIMERFD 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory where libtool stores uninstalled libraries. */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libusb-1.0"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "libusb-devel@lists.sourceforge.net"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "libusb-1.0"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libusb-1.0 1.0.25"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "libusb-1.0"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL "http://libusb.info"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.0.25"
-
-/* Define to 1 if compiling for a POSIX platform. */
-#define PLATFORM_POSIX 1
-
-/* Define to 1 if compiling for a Windows platform. */
-/* #undef PLATFORM_WINDOWS */
-
-/* Define to the attribute for enabling parameter checks on printf-like
- functions. */
-#define PRINTF_FORMAT(a, b) __attribute__ ((__format__ (__printf__, a, b)))
-
-/* Define to 1 if all of the C90 standard headers exist (not just the ones
- required in a freestanding environment). This macro is provided for
- backward compatibility; new code need not use it. */
-#define STDC_HEADERS 1
-
-/* Define to 1 to output logging messages to the systemwide log. */
-/* #undef USE_SYSTEM_LOGGING_FACILITY */
-
-/* Version number of package */
-#define VERSION "1.0.25"
-
-/* Enable GNU extensions. */
-#define _GNU_SOURCE 1
-
-/* Define to the oldest supported Windows version. */
-/* #undef _WIN32_WINNT */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
diff --git a/src/make.mk b/src/make.mk
index 85d90e8..8f17b8d 100644
--- a/src/make.mk
+++ b/src/make.mk
@@ -1,7 +1,7 @@
DIR=src
-SRC_UTILS_PRE += $(wildcard $(DIR)/os/*.c)
SRC_UTILS += $(wildcard $(DIR)/*.c)
+SRC_UTILS_PRE += $(wildcard $(DIR)/os/*.c)
SRC_UTILS_PRE_L += $(wildcard $(DIR)/os/linux/*.c)
SRC_UTILS_PRE_M = $(wildcard $(DIR)/os/macos/*.c)
OBJ_UTILS += $(SRC_UTILS:.c=.o)
@@ -10,7 +10,16 @@ OBJ_UTILS_PRE_M += $(SRC_UTILS_PRE_M:.c=.o)
OBJ_UTILS_PRE_L += $(SRC_UTILS_PRE_L:.c=.o)
LDFLAGS_UTILS =
INCLUDE = -I./include -I./src
+INCLUDE_L = -I./include/linux
+INCLUDE_M = -I./include/macos
CFLAGS = -fPIC
+OS = linux
+
+
+
+build-src: INCLUDE += $(INCLUDE_L)
+
+
build-src: src-pre
echo "Hello"
@@ -18,7 +27,7 @@ build-src: src-pre
echo $(SRC_UTILS)
-
+build-src-macos: INCLUDE += $(INCLUDE_M)
build-src-macos: print src-pre-macos
echo "Build macos"
@@ -27,10 +36,10 @@ print:
echo "$(OBJ_UTILS_PRE_M)"
echo "$(OBJ_UTILS)"
-$(DIR)-pre-macos: $(OBJ_UTILS_PRE) $(OBJ_UTILS_PRE_M) $(OBJ_UTILS)
+$(DIR)-pre-macos: $(OBJ_UTILS) $(OBJ_UTILS_PRE) $(OBJ_UTILS_PRE_M)
echo "here 2"
-$(DIR)-pre: $(OBJ_UTILS_PRE) $(OBJ_UTILS_PRE_L) $(OBJ_UTILS)
+$(DIR)-pre: $(OBJ_UTILS) $(OBJ_UTILS_PRE) $(OBJ_UTILS_PRE_L)
echo "here 1"
$(DIR)/os/%.o: $(DIR)/os/%.c
@@ -39,4 +48,5 @@ $(DIR)/os/%.o: $(DIR)/os/%.c
$(DIR)/%.o: $(DIR)/%.c
echo "B"
- $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $(BUILD_DIR)$@ $(LDFLAGS_UTILS) \ No newline at end of file
+ $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $(BUILD_DIR)$@ $(LDFLAGS_UTILS)
+