OSDN Git Service

Rewrote almost all Makefiles: do not use strip $(x),y; run strip on all objects at...
[uclinux-h8/uClibc.git] / libc / misc / mntent / Makefile
index 65fa346..871e3e6 100644 (file)
 TOPDIR=../../../
 include $(TOPDIR)Rules.mak
 
-CSRC=mntent.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := mntent.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
 
-all: $(OBJS) $(LIBC)
+OBJ_LIST := ../../obj.misc.mntent
 
-$(LIBC): ar-target
+all: $(OBJ_LIST)
 
-ar-target: $(OBJS)
-       $(AR) $(ARFLAGS) $(LIBC) $(OBJS)
+$(OBJ_LIST): $(OBJS)
+       $(STRIPTOOL) -x -R .note -R .comment $^
+       echo $(patsubst %, misc/mntent/%, $^) > $@
 
-$(COBJS): %.o : %.c
+$(OBJS): %.o : %.c
        $(CC) $(CFLAGS) -c $< -o $@
-       $(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-       rm -f *.[oa] *~ core
-
+       $(RM) *.o *~ core