# Linux uses malloc from GNU, which returns NULL from malloc (0).
# stdlib.h fixes it. But I don't know if it is ever included, so I
# fixed it in config.h. Here we just tell stdlib.h not to fix it.
X_CFLAGS=-DPOSIX -DNO_FIX_MALLOC
# Linux will get GNU install when Linux 1.0 is out.
INSTALL=cp
# we are native.
prefix=/usr
# no object c, why bother.
LANGUAGES = c c++ proto

# Linux uses a different directory structure.
STANDARD_STARTFILE_PREFIX=$(libsubdir)/
GPLUSPLUS_INCLUDE_DIR=$(prefix)/g++-include

# Linux uses .a format to do upgrade. When a new libc.a is out, we
# can do
#
#	gcc -o foo foo.a
#
LD=ld
ALIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC)

linux.a: cpp.a cc1.a cc1plus.a gcc.a

cpp.a: cccp.o cexp.o version.o $(LIBDEPS)
	$(LD) -x -r -o cpp.a cccp.o cexp.o version.o $(ALIBS)

cc1.a:$(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
	$(LD) -x -r -o cc1.a $(C_OBJS) $(OBJS) $(ALIBS)

cc1plus.a:$(P) $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
	$(LD) -x -r -o cc1plus.a $(CPLUS_OBJS) $(OBJS) $(ALIBS)

gcc.a: gcc.o version.o $(LIBDEPS)
	$(LD) -x -r -o gcc.a gcc.o version.o $(ALIBS)
