# Makefile.unix.linux, Copyright 1999 (c) by G. Fankhauser, # Swiss Federal Institute of Technology, # Computer Engineering and Networks Laboratory. # # TOPSY -- A Teachable Operating System. # Implementation of a tiny and simple # micro kernel for teaching purposes. # # For further information, please visit http://www.tik.ee.ethz.ch/~topsy # # This software is provided under the terms of the GNU General Public Licence. # A full copy of the GNU GPL is provided in the file COPYING found in the # development root of Topsy. # # # File: $Source: /usr/drwho/vault/cvs/topsy/Topsy/Makefiles/Makefile.unix.linux,v $ # Author(s): # Affiliation: ETH Zuerich, TIK # Version: $Revision: 1.11 $ # Creation Date: # Last Date of Change: $Date: 2000/12/21 09:43:56 $ by: $Author: gfa $ # # # $Log: Makefile.unix.linux,v $ # Revision 1.11 2000/12/21 09:43:56 gfa # compile fix # # Revision 1.10 1999/12/15 15:15:41 gfa # *** empty log message *** # # Revision 1.9 1999/12/13 21:48:29 ruf # GNU General Public Licence Update # # Revision 1.8 1999/10/23 19:07:12 jeker # added Makefile.SimOS.mips and did some code cleanup # # Revision 1.7 1999/09/17 07:55:04 gfa # new automatic version string # # Revision 1.6 1999/09/11 12:14:54 gfa # precaution for gcc 2.95 # # Revision 1.5 1999/06/12 17:16:44 gfa # a32 bootimage target added # # Revision 1.4 1999/06/12 16:54:37 gfa # linkscript typo... # # Revision 1.3 1999/06/10 15:10:55 jeker # cleaning up # # Revision 1.2 1999/06/10 08:30:11 gfa # linux tweaking... # # Revision 1.1 1999/06/09 19:09:57 gfa # clean up for unix # # # ############################################################################### # machine dependent subdirectories for each module and folder for object files ARCH=unix # make procedures for the outside all: version kernel user # include default stuff include Makefiles/Makefile.default include Makefiles/Makefile.user # host platform (Filename Platform.ARCH.PLATFORM) include Makefiles/Platform.$(ARCH).linux # address of memory layout description after loading # needed by both kernel startup code (which passes the pointer to the # memory manager) and the bootlinker SEGMAPDEFINE= #CC=insure # compiler defines DEBUG=-g CCDEBUG=$(DEBUG) -ggdb CFLAGS=$(MACHINE_CFLAGS) $(CCDEBUG) -Wall INC=$(addprefix -I, $(ALLDIRS)) DEFS = -DDEBUG_LEVEL=2 OPTIMIZE = -O2 -fno-strict-aliasing LDFLAGS = $(DEBUG) # first the kernel architecture depending files STFILESARCH=start.c TOFILESARCH=Exception.c SyscallMsg.c PrintReg.c MMFILESARCH=MMDirectMapping.c MMError.c TMFILESARCH=TMClock.c TMError.c TMException.c TMHal.c IOFILESARCH=IOHal.c # now the drivers, this is a temporary solution, will be changed in near future IOFILESDRIVERS=UnixConsole.c Loopback.c # make depending files LINKSCRIPT=link.linux.scr KERNEL_LINKSCRIPT=Boot/$(ARCH)/$(LINKSCRIPT) USER_LINKSCRIPT=User/$(LINKSCRIPT) ######################### KERNELSTUFF ######################### # this builds the Topsy unix "kernel" kernel: kernel.elf kernel.elf: $(REALKERNELOBJS) $(CC) $(LDFLAGS) -ldl -o kernel $(LIBS) $(REALKERNELOBJS) ########################## USER STUFF ########################## # this builds the Topsy User stuff user: user.unix user.unix: $(REALOBJS) $(SYSCALL) $(USER_LINKSCRIPT) $(LD) -Bstatic $(LDFLAGS) -o user $(REALOBJS) $(SYSCALL) $(LIBS) \ -T $(USER_LINKSCRIPT) $(OBJCOPY) user --output-target binary user.bin size: find unix.obj -name "*.o" -print | xargs -x $(SIZE) | sort -n -r echo -n "unix kernel:" $(SIZE) -Ax kernel