summaryrefslogtreecommitdiff
path: root/libc/misc/internals
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/internals')
-rw-r--r--libc/misc/internals/Makefile22
1 files changed, 10 insertions, 12 deletions
diff --git a/libc/misc/internals/Makefile b/libc/misc/internals/Makefile
index fc5ca267b..52fd45a44 100644
--- a/libc/misc/internals/Makefile
+++ b/libc/misc/internals/Makefile
@@ -24,25 +24,23 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=__uClibc_main.c tempname.c errno.c __errno_location.c __h_errno_location.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-
-ifeq ($(UCLIBC_HAS_SSP),y)
-__uClibc_main.o: CFLAGS += $(SSP_DISABLE_FLAGS)
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
endif
-OBJS=$(COBJS)
+CSRC := __uClibc_main.c tempname.c errno.c __errno_location.c __h_errno_location.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-ifeq ($(UCLIBC_HAS_THREADS),y)
-CFLAGS += $(PTINC)
+ifeq ($(UCLIBC_HAS_SSP),y)
+__uClibc_main.o: CFLAGS += $(SSP_DISABLE_FLAGS)
endif
-OBJ_LIST=../../obj.misc.internals
+OBJ_LIST := ../../obj.misc.internals
all: $(OBJ_LIST) interp.o static.o
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/internals/%, $(OBJS)) > $(OBJ_LIST)
+ echo $(patsubst %, misc/internals/%, $^) > $@
interp.c: Makefile
echo "/* Force shared libraries to know about the correct library loader */" > interp.c
@@ -52,9 +50,9 @@ interp.c: Makefile
"(\".interp\"))) =\""$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)"\";" >> interp.c
echo "#endif" >> interp.c
-$(COBJS) interp.o static.o: %.o : %.c
+$(OBJS) interp.o static.o: %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] interp.c *~ core
+ $(RM) *.o interp.c *~ core