summaryrefslogtreecommitdiff
path: root/libc/unistd/Makefile
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2004-01-02 08:44:58 +0000
committerManuel Novoa III <mjn3@codepoet.org>2004-01-02 08:44:58 +0000
commit400e6fc264cbe6ca3ca572d94bbf5f929f256713 (patch)
tree7c7cd0d0dc3e59fe1ab7e369e73c1d521797c47b /libc/unistd/Makefile
parent33e58d3c9e1282b210313c8ee46daeb74edb99e8 (diff)
Redo the exec functions to comply with SUSv3.
Diffstat (limited to 'libc/unistd/Makefile')
-rw-r--r--libc/unistd/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/libc/unistd/Makefile b/libc/unistd/Makefile
index 2ab770cab..3bd44d778 100644
--- a/libc/unistd/Makefile
+++ b/libc/unistd/Makefile
@@ -20,13 +20,18 @@ TOPDIR=../../
include $(TOPDIR)Rules.mak
DIRS:=
-CSRC=execl.c execlp.c execv.c execvep.c execvp.c execle.c \
- sleep.c usleep.c getpass.c sysconf.c getlogin.c \
+MSRC1 = exec.c
+MOBJ1 = execl.o execv.o execle.o execlp.o execvp.o
+
+CSRC= sleep.c usleep.c getpass.c sysconf.c getlogin.c \
fpathconf.c confstr.c pathconf.c swab.c usershell.c \
getsubopt.c
+
ifeq ($(strip $(UCLIBC_HAS_MMU)),y)
- CSRC+=daemon.c
+ CSRC += daemon.c
+ MOBJ1 += __exec_alloc.o
endif
+
ifeq ($(strip $(UCLIBC_HAS_GNU_GETOPT)),y)
CSRC += getopt.c
else
@@ -34,7 +39,7 @@ else
endif
COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+OBJS=$(COBJS) $(MOBJ1)
all: $(SYSCONF) $(OBJS) $(LIBC)
@@ -43,6 +48,10 @@ $(LIBC): ar-target subdirs
ar-target: $(OBJS)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
+$(MOBJ1): $(MSRC1)
+ $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(STRIPTOOL) -x -R .note -R .comment $*.o
+
$(COBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o