Formerly posix/Makefile.~14~
authorroland <roland>
Mon, 6 Jul 1992 23:57:09 +0000 (23:57 +0000)
committerroland <roland>
Mon, 6 Jul 1992 23:57:09 +0000 (23:57 +0000)
sysdeps/posix/Makefile

index 23acd90..c70a819 100644 (file)
@@ -22,10 +22,15 @@ $(objpfx)stdio_lim.h: $(objpfx)mk-stdiolim
 
 vpath %.h $(..)
 
+ifdef subdir
+objdir-CPPFLAGS = $(CPPFLAGS) # Already has appropriate `..'s.
+else
+objdir-CPPFLAGS = $(patsubst -I%,-I../%,$(patsubst -I/%,-I//%))
+endif
 # The point of this is to not use -W options to gcc.
 $(objpfx)mk-stdiolim: $(sysdep_dir)/posix/mk-stdiolim.c \
                        posix1_lim.h local_lim.h
-       cwd=`pwd`; cd $(objdir); $(CC) $(CPPFLAGS) \
+       cwd=`pwd`; cd $(objdir); $(CC) $(objdir-CPPFLAGS) \
          $$cwd/$< -o $(@:$(objpfx)%=%)