summaryrefslogtreecommitdiff
path: root/libc/unistd
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-12 16:12:36 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-12 16:12:36 +0000
commit3a7ac9c7a7b4d6181d3cd70a9cb85d93a1938238 (patch)
treef87aedb508cd30ff8d50b75dbe832d34ac5dad85 /libc/unistd
parentb0c8130cec05f40ce926058d18fbc520b1a0e856 (diff)
Rewrote almost all Makefiles: do not use strip $(x),y; run strip on all objects at once; use :=//$</$^; use CRT_SRC/CRT_OBJ/SCRT_OBJ/CSRC/COBJ/SSRC/SOBJ/MSRC/MOBJ where no more is needed, if only CSRC is present use OBJS directly instead of COBJ; CTOR_TARGETS are created directly in lib; remove unused/unneeded parts. Hope I haven't broken too much.
Diffstat (limited to 'libc/unistd')
-rw-r--r--libc/unistd/Makefile49
1 files changed, 16 insertions, 33 deletions
diff --git a/libc/unistd/Makefile b/libc/unistd/Makefile
index 6493615b2..7512e8362 100644
--- a/libc/unistd/Makefile
+++ b/libc/unistd/Makefile
@@ -18,57 +18,40 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-DIRS:=
-MSRC1 = exec.c
-MOBJ1 = execl.o execv.o execle.o execlp.o execvp.o
+MSRC := exec.c
+MOBJ = execl.o execv.o execle.o execlp.o execvp.o
-CSRC= sleep.c usleep.c ualarm.c getpass.c sysconf.c getlogin.c \
+CSRC = sleep.c usleep.c ualarm.c getpass.c sysconf.c getlogin.c \
fpathconf.c confstr.c pathconf.c swab.c usershell.c \
getsubopt.c daemon.c
-ifneq ($(strip $(ARCH_HAS_MMU)),y)
- MOBJ1 += __exec_alloc.o
+ifneq ($(ARCH_HAS_MMU),y)
+MOBJ += __exec_alloc.o
endif
-ifeq ($(strip $(UCLIBC_HAS_GNU_GETOPT)),y)
- CSRC += getopt.c
+ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
+CSRC += getopt.c
else
- CSRC += getopt-susv3.c
+CSRC += getopt-susv3.c
endif
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS) $(MOBJ1)
+COBJ := $(patsubst %.c,%.o, $(CSRC))
+OBJS := $(COBJ) $(MOBJ)
-OBJ_LIST=../obj.unistd
+OBJ_LIST := ../obj.unistd
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, unistd/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, unistd/%, $^) > $@
-$(MOBJ1): $(MSRC1)
+$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-$(OBJ): Makefile
-
-subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
-
-$(patsubst %, _dir_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dir_%, %, $@)
-
-$(patsubst %, _dirclean_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
-
-.PHONY: dummy
-dummy:
clean:
- $(RM) *.[oa] *~ core
-
+ $(RM) *.o *~ core