appropriate awk implementation at compile time, so we can again
compile on Solaris and whatnot.
-Erik
LIBC:=$(TOPDIR)libc/libc.a
LIBGCC:=$(shell $(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name)
+# check if we have nawk, otherwise user awk
+AWK:= ${shell if [ -x /usr/bin/nawk ]; then echo "/usr/bin/nawk"; else echo "/usr/bin/awk"; fi}
+
NATIVE_ARCH:= ${shell uname -m | sed \
-e 's/i.86/i386/' \
-e 's/sparc.*/sparc/' \
$(CC) $(SAFECFLAGS) -I$(TOPDIR)include -c initfini.c -S -o initfini.s
crti.S crtn.S: initfini.s $(TOPDIR)/extra/scripts/initfini.awk
- $(TOPDIR)/extra/scripts/initfini.awk initfini.s
+ $(AWK) -f $(TOPDIR)extra/scripts/initfini.awk initfini.s
crti.o: crti.S
$(CC) $(SAFECFLAGS) -c crti.S -o crti.o
cp crtn.o $(TOPDIR)lib/
clean:
- rm -f *.[oa] *~ core crti.* crtn.* initfini.s
+ rm -f *.[oa] *~ core crt[in].* initfini.s