Newer
Older
Scratch / lockwasher / src / tools / Makefile
# $Id: Makefile,v 1.14 2003/05/04 13:20:15 reddawg Exp $
# Kernel Makefile (C) 2002 The UbixOS Project


#Compiler
GCC = gcc 
G++ = gcc

#Linker
LD = ld

#Kernel File Name
BINARY = format

#Delete Program
REMOVE = rm -f

#Objects
OBJS = format.o

# Link the kernel statically with fixed text+data address @1M
$(BINARY) : $(OBJS)
	$(GCC)  -o $@ $(OBJS)

# Compile the source files
.cc.o:
	$(G++)  -Wall -fomit-frame-pointer -O -I../sys/include -c -o $@ $<
 
.cc.s:
	$(G++)  -Wall -fomit-frame-pointer -O -I../sys/include -S -o $@ $<
 
.c.o:
	$(GCC)  -Wall -O -c -o $@ $<
 
.c.s:
	$(GCC)  -Wall -fomit-frame-pointer -O -I../sys/include -S -o $@ $<
 
.S.o:
	$(GCC)  -Wall -fomit-frame-pointer -c -o $@ $<
 
# Clean up the junk
clean:
	$(REMOVE) $(OBJS) $(BINARY) *.core

format-dsk:
	(cp ../sys/compile/ubix.elf ./)
	(cp ../bin/init/init ./)
	(cp ../bin/shell/shell ./)
	(cp ../bin/test/test ./)
	(cp ../bin/ls/ls ./)
	(cp ../bin/pwd/pwd ./)
	(cp ../bin/login/login ./)
	(cp ../bin/cat/cat ./)
	(cp ../bin/de/de ./)
	(cp ../bin/muffin/muffin ./)
	(cp ../lib/libc/libc.so ./)  
	(cp ../bin/goofball/goofball ./)
	(cp ../bin/ld-dyn/ld-dyn ./)
	(./format 50 2000 ubix.elf 0 shell 3754 test 3754 muffin 3754 goofball 3754)
	(./format 1000 2000 init 3754 de 3754 ls 3754 userdb 3754 login 3754 motd 0 PACMAN.DPF 3754 pwd 3754 cat 3754 mbr.img 3754 ld-dyn 3754 libc.so 3754)
	(rm ubix.elf)
	(rm init)
	(rm shell)
	(rm test)
	(rm ls)
	(rm pwd)
	(rm cat)
	(rm de)
	(rm muffin)
	(rm login)
	(rm libc.so)
	(rm goofball)
	(rm ld-dyn)