chiark / gitweb /
[PATCH] volume-id build fix and update
[elogind.git] / klibc / klibc / Makefile
index 470a276ded9f022eea2348e1a6ee689f85284f24..7ed03a8e87d2f4b7b7fa8aa0e558ec8f1c3f243f 100644 (file)
@@ -17,23 +17,26 @@ LIBOBJS = vsnprintf.o snprintf.o vsprintf.o sprintf.o \
          strtoimax.o strtoumax.o \
          globals.o exitc.o atexit.o onexit.o \
          execl.o execle.o execv.o execvpe.o execvp.o execlp.o execlpe.o \
-         fork.o wait.o wait3.o waitpid.o system.o setpgrp.o \
+         fork.o wait.o wait3.o waitpid.o system.o setpgrp.o getpgrp.o \
+         open.o \
          printf.o vprintf.o fprintf.o vfprintf.o perror.o \
          fopen.o fread.o fread2.o fgetc.o fgets.o \
          fwrite.o fwrite2.o fputc.o fputs.o puts.o \
          sleep.o usleep.o raise.o abort.o assert.o alarm.o pause.o \
-         __signal.o signal.o bsd_signal.o siglist.o siglongjmp.o \
+         __signal.o sysv_signal.o bsd_signal.o siglist.o siglongjmp.o \
          sigaction.o sigpending.o sigprocmask.o sigsuspend.o \
-         brk.o sbrk.o malloc.o realloc.o calloc.o mmap.o \
+         brk.o sbrk.o malloc.o realloc.o calloc.o mmap.o getpagesize.o \
          memcpy.o memcmp.o memset.o memccpy.o memmem.o memswap.o \
          memmove.o \
+         strcasecmp.o strncasecmp.o strndup.o strerror.o \
          strcat.o strchr.o strcmp.o strcpy.o strdup.o strlen.o \
          strncat.o strstr.o strncmp.o strncpy.o strrchr.o strspn.o \
          strsep.o strtok.o \
          gethostname.o getdomainname.o getcwd.o \
          seteuid.o setegid.o setresuid.o setresgid.o \
-         getenv.o setenv.o unsetenv.o getopt.o readdir.o \
-         syslog.o closelog.o pty.o isatty.o reboot.o \
+         getenv.o setenv.o putenv.o __put_env.o unsetenv.o \
+         getopt.o readdir.o \
+         syslog.o closelog.o pty.o getpt.o isatty.o reboot.o \
          time.o utime.o fdatasync.o llseek.o select.o nice.o getpriority.o \
          qsort.o lrand48.o srand48.o seed48.o \
          inet/inet_ntoa.o inet/inet_aton.o inet/inet_addr.o \
@@ -56,6 +59,12 @@ tests: $(TESTS)
 tests/%.o : tests/%.c
        $(CC) $(CFLAGS) -c -o $@ $<
 
+# This particular file uses a bunch of formats gcc don't know of, in order
+# to test the full range of our vsnprintf() function.  This outputs a bunch
+# of useless warnings unless we tell it not to.
+tests/testvsnp.o : tests/testvsnp.c
+       $(CC) $(CFLAGS) -Wno-format -c -o $@ $<
+
 tests/% : tests/%.o $(LIB) $(CRT0)
        $(LD) $(LDFLAGS) -o $@ $(CRT0) $< $(LIB) $(LIBGCC)
        cp $@ $@.stripped
@@ -111,12 +120,12 @@ socketcalls.dir: SOCKETCALLS socketcalls.pl socketcommon.h
        touch $@
 
 %/static.obj: %.dir
-       $(MAKE) objects-$(basename $(notdir $@)) DIR=$*
+       $(MAKE) objects-$(basename $(notdir $@)) DIR=$*/
 
-STATIC = $(addsuffix .o,$(basename $(wildcard $(DIR)/*.[cS])))
+STATIC = $(addsuffix .o,$(basename $(wildcard $(DIR)*.[cS])))
 
 objects-static: $(STATIC)
-       touch $(DIR)/static.obj
+       touch $(DIR)static.obj
 
 clean: archclean
        find . -type f -a \( -name \*.[isoa] -o -name \*.l[iso] \) -print0 | xargs -0rt rm -f
@@ -130,6 +139,9 @@ spotless: clean
        find . \( -name \*~ -o -name '.*.d' \) -not -type d -print0 | \
                xargs -0rt rm -f
 
-ifneq ($(wildcard $(DIR)/.*.d),)
-include $(wildcard $(DIR)/.*.d)
+bitsize:
+       @echo $(BITSIZE)
+
+ifneq ($(wildcard $(DIR).*.d),)
+include $(wildcard $(DIR).*.d)
 endif