summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/Makefile4
-rw-r--r--libc/inet/rpc/Makefile3
-rw-r--r--libc/misc/internals/Makefile4
-rw-r--r--libc/misc/pthread/Makefile12
-rw-r--r--libc/misc/syslog/Makefile4
-rw-r--r--libc/stdio/Makefile4
-rw-r--r--libc/stdlib/malloc-standard/Makefile6
7 files changed, 24 insertions, 13 deletions
diff --git a/libc/inet/Makefile b/libc/inet/Makefile
index e7018db7c..6d59e1856 100644
--- a/libc/inet/Makefile
+++ b/libc/inet/Makefile
@@ -56,6 +56,10 @@ CSRC =getservice.c getproto.c hostid.c getnetent.c getnetbynm.c getnetbyad.c \
COBJS=$(patsubst %.c,%.o, $(CSRC))
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJS)
OBJ_LIST=../obj.inet
diff --git a/libc/inet/rpc/Makefile b/libc/inet/rpc/Makefile
index 352e9a28b..a08cf89ea 100644
--- a/libc/inet/rpc/Makefile
+++ b/libc/inet/rpc/Makefile
@@ -23,7 +23,6 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CFLAGS+=-I$(TOPDIR)libpthread/linuxthreads/sysdeps/pthread
ifeq ($(strip $(UCLIBC_HAS_FULL_RPC)),y)
CSRC :=auth_none.c auth_unix.c authunix_prot.c bindresvport.c \
@@ -58,7 +57,7 @@ $(OBJ_LIST): $(OBJS)
echo $(patsubst %, inet/rpc/%, $(OBJS)) > $(OBJ_LIST)
$(COBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(CFLAGS) $(PTINC) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
diff --git a/libc/misc/internals/Makefile b/libc/misc/internals/Makefile
index fee3eca70..1df05a934 100644
--- a/libc/misc/internals/Makefile
+++ b/libc/misc/internals/Makefile
@@ -31,6 +31,10 @@ __uClibc_main.o: CFLAGS += $(SSP_DISABLE_FLAGS)
OBJS=$(COBJS)
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
OBJ_LIST=../../obj.misc.internals
all: $(OBJ_LIST) interp.o static.o
diff --git a/libc/misc/pthread/Makefile b/libc/misc/pthread/Makefile
index 0e432d308..e222e1442 100644
--- a/libc/misc/pthread/Makefile
+++ b/libc/misc/pthread/Makefile
@@ -19,16 +19,6 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-PTDIR = $(TOPDIR)libpthread/linuxthreads/
-SYSDEPINC = -I$(PTDIR)sysdeps/unix/sysv/linux \
- -I$(PTDIR)sysdeps/pthread \
- -I$(PTDIR)sysdeps/unix/sysv \
- -I$(PTDIR)sysdeps/unix/unix \
- -I$(PTDIR)sysdeps/$(TARGET_ARCH) \
- -I$(PTDIR)sysdeps \
- -I$(TOPDIR)libc/sysdeps/linux/$(TARGET_ARCH)
-CFLAGS += $(SYSDEPINC) -D_GNU_SOURCE
-
CSRC=no-tsd.c weaks.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(COBJS)
@@ -41,7 +31,7 @@ $(OBJ_LIST): $(OBJS)
echo $(patsubst %, misc/pthread/%, $(OBJS)) > $(OBJ_LIST)
$(COBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(CFLAGS) $(PTINC) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
diff --git a/libc/misc/syslog/Makefile b/libc/misc/syslog/Makefile
index 35e755e40..26239ab7b 100644
--- a/libc/misc/syslog/Makefile
+++ b/libc/misc/syslog/Makefile
@@ -28,6 +28,10 @@ CSRC=syslog.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(COBJS)
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
OBJ_LIST=../../obj.misc.syslog
all: $(OBJ_LIST)
diff --git a/libc/stdio/Makefile b/libc/stdio/Makefile
index b737410d9..91a011eed 100644
--- a/libc/stdio/Makefile
+++ b/libc/stdio/Makefile
@@ -116,6 +116,10 @@ ifeq ($(strip $(UCLIBC_HAS_LFS)),y)
OBJS += $(CLOBJS)
endif
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
OBJ_LIST=../obj.stdio
all: $(OBJ_LIST)
diff --git a/libc/stdlib/malloc-standard/Makefile b/libc/stdlib/malloc-standard/Makefile
index 0af06b3ff..331feae20 100644
--- a/libc/stdlib/malloc-standard/Makefile
+++ b/libc/stdlib/malloc-standard/Makefile
@@ -32,9 +32,15 @@ endif
# calloc.c can be found at uClibc/libc/stdlib/calloc.c
# valloc.c can be found at uClibc/libc/stdlib/valloc.c
CSRC=malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c
+
COBJS=$(patsubst %.c,%.o, $(CSRC))
+
OBJS=$(COBJS)
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
OBJ_LIST=../../obj.stdlib.malloc-standard
all: $(OBJ_LIST)