head	1.1;
branch	1.1.1;
access;
symbols
	LIBC_4_5_19:1.1.1.3
	LIBC_4_5_18:1.1.1.3
	LIBC_4_5_17:1.1.1.3
	LIBC_4_5_16:1.1.1.3
	LIBC_4_5_15:1.1.1.3
	LIBC_4_5_14:1.1.1.3
	LIBC_4_5_13:1.1.1.3
	LIBC_4_5_12:1.1.1.3
	LIBC_4_5_11:1.1.1.3
	LIBC_4_5_10:1.1.1.2
	LIBC_4_5_9:1.1.1.1
	LIBC_4_5_8:1.1.1.1
	LIBC_4_5_7:1.1.1.1
	LIBC:1.1.1;
locks; strict;
comment	@# @;


1.1
date	93.12.14.16.58.53;	author steinber;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	93.12.14.16.58.54;	author steinber;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	94.01.13.12.16.43;	author steinber;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	94.01.19.16.25.10;	author steinber;	state Exp;
branches;
next	;


desc
@@



1.1
log
@Initial revision
@
text
@#
# Makefile for Linux specific functions
#

include ../Makeconfig

include ../Makerules

ifndef OPTFLAGS
OPTFLAGS= -O6 -fomit-frame-pointer
endif

CFLAGS = $(WFLAGS) $(OPTFLAGS) $(INC) $(XCFLAGS)

DIRS=crt lib
LIBS=lib/libalias.a lib/libc.a
PROGS=sln

ifeq "$(HOST_MACHINE)" "linux"

HOSTLIBDIR=$(HOSTROOTDIR)/lib

else

HOSTLIBDIR=$(HOSTROOTDIR)/$(TARGET_MACHINE)/lib

endif

all: library $(PROGS)

sln: sln.o
	$(LD) -N -dll-verbose -static -o $@@ crt/crt0.o $? $(LIBS) \
		-L$(HOSTLIBDIR) -lgcc

library:
	for i in $(DIRS); do \
	  echo making $$i; \
	  (cd $$i; $(MAKE)); \
	done

lib: $(OBJS)
	$(AR) uvc $(LIB) $(OBJS)

asm: $(ASMS)
	for i in $(DIRS); \
	do \
		echo making asm in $$i; \
		(cd $$i; $(MAKE) asm); \
	done

clean:
	$(RM) -f core *.i *.s *.o *.a tmp_make foo $(PROGS)
	for i in $(DIRS); \
	do \
		echo cleaning $$i; \
		(cd $$i; $(MAKE) clean); \
	done

dep:
	$(CC) $(CFLAGS) -M *.c > .include

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
@


1.1.1.1
log
@LIBC_4_5_7
@
text
@@


1.1.1.2
log
@LIBC_4_5_10
@
text
@d6 1
d9 5
a13 1
.PHONY: lib
d15 2
a16 3
DIRS=lib
LIBS=../libalias.a lib/libc.a
CRT0=./lib/$(TARGET_ARCH)/crt/crt0.o
d19 11
a29 1
all: lib $(PROGS)
d32 2
a33 2
	$(LD) -N -dll-verbose -static -o $@@ $(CRT0) $? $(LIBS) \
		`gcc -b $(TARGET_MACHINE) --print`
d35 1
a35 1
lib:
d37 2
a38 2
	  echo making $@@ in $$i; \
	  (cd $$i; $(MAKE) $@@); \
d41 2
a42 8
install: $(PROGS)
	@@if [ -d $(TARGET_SBIN_DIR) ]; then \
	  echo installing $(PROGS) to $(TARGET_SBIN_DIR)/; \
	  cp $(PROGS) $(TARGET_SBIN_DIR)/; \
	else \
	  echo \"$(TARGET_SBIN_DIR)\" is not a directory!; \
	  exit 1; \
	fi
d45 5
a52 12
	$(MAKE) subdir TARGET=$@@

realclean:
	$(RM) -f core *.i *.s *.o *.a tmp_make foo $(PROGS) .depend
	$(MAKE) subdir TARGET=$@@

depend:
	$(CC) $(CFLAGS) -M *.c > .depend
	$(MAKE) subdir TARGET=$@@

subdir:
ifneq ($(DIRS),)
d55 2
a56 2
		echo making $@@ in $$i; \
		(cd $$i; $(MAKE) $@@); \
d58 3
a60 3
else
	@@true
endif
@


1.1.1.3
log
@LIBC_4_5_11
@
text
@d5 2
a6 1
TOPDIR=..
a7 3
include $(TOPDIR)/Makeconfig
include $(TOPDIR)/Makerules

d11 1
a11 1
LIBS=$(TOPDIR)/libalias.a lib/libc.a
d21 6
d38 1
a38 1
clean::
d40 1
d42 1
a42 1
realclean::
d44 1
d46 1
a46 1
depend::
d48 1
d50 1
d52 1
a52 2
lib realclean clean depend::
	@@for i in $(DIRS); \
a57 1
lib::
@
