Permalink
Browse files

linux: move files out of src/unix/linux

Flattens the source tree and simplifies the Makefile.
  • Loading branch information...
bnoordhuis committed Jan 29, 2013
1 parent 75dea93 commit b607a7fed7934c507efa6d1ca08daee773214dac
View
@@ -195,10 +195,10 @@ Linux)
SPARSE_FLAGS="$SPARSE_FLAGS -D__linux__=1"
SOURCES="$SOURCES
include/uv-private/uv-linux.h
- src/unix/linux/inotify.c
- src/unix/linux/linux-core.c
- src/unix/linux/syscalls.c
- src/unix/linux/syscalls.h"
+ src/unix/linux-inotify.c
+ src/unix/linux-core.c
+ src/unix/linux-syscalls.c
+ src/unix/linux-syscalls.h"
;;
NetBSD)
SPARSE_FLAGS="$SPARSE_FLAGS -D__NetBSD__=1"
View
@@ -81,9 +81,9 @@ ifeq (linux,$(OS))
CSTDFLAG += -D_GNU_SOURCE
LDFLAGS+=-ldl -lrt
RUNNER_CFLAGS += -D_GNU_SOURCE
-OBJS += src/unix/linux/linux-core.o \
- src/unix/linux/inotify.o \
- src/unix/linux/syscalls.o
+OBJS += src/unix/linux-core.o \
+ src/unix/linux-inotify.o \
+ src/unix/linux-syscalls.o
endif
ifeq (freebsd,$(OS))
@@ -130,6 +130,14 @@ libuv.$(SOEXT): override CFLAGS += -fPIC
libuv.$(SOEXT): $(OBJS)
$(CC) -shared -o $@ $^ $(LDFLAGS)
+include/uv-private/uv-unix.h: \
+ include/uv-private/uv-bsd.h \
+ include/uv-private/uv-darwin.h \
+ include/uv-private/uv-linux.h \
+ include/uv-private/uv-sunos.h
+
+src/unix/internal.h: src/unix/linux-syscalls.h
+
src/unix/%.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/internal.h
@mkdir -p $(dir $@)
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
View
@@ -32,7 +32,7 @@
#endif
#if defined(__linux__)
-# include "linux/syscalls.h"
+# include "linux-syscalls.h"
#endif /* __linux__ */
#if defined(__sun)
@@ -19,7 +19,7 @@
*/
#include "uv.h"
-#include "../internal.h"
+#include "internal.h"
#include <stdint.h>
#include <stdio.h>
@@ -20,8 +20,7 @@
#include "uv.h"
#include "tree.h"
-#include "../internal.h"
-#include "syscalls.h"
+#include "internal.h"
#include <stdint.h>
#include <stdio.h>
@@ -19,7 +19,7 @@
* IN THE SOFTWARE.
*/
-#include "syscalls.h"
+#include "linux-syscalls.h"
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/types.h>
File renamed without changes.
View
8 uv.gyp
@@ -170,10 +170,10 @@
}],
[ 'OS=="linux"', {
'sources': [
- 'src/unix/linux/linux-core.c',
- 'src/unix/linux/inotify.c',
- 'src/unix/linux/syscalls.c',
- 'src/unix/linux/syscalls.h',
+ 'src/unix/linux-core.c',
+ 'src/unix/linux-inotify.c',
+ 'src/unix/linux-syscalls.c',
+ 'src/unix/linux-syscalls.h',
],
'link_settings': {
'libraries': [ '-ldl', '-lrt' ],

0 comments on commit b607a7f

Please sign in to comment.