Newer
Older
Scratch / lockwasher / src / bin / muffin / Makefile
# $Id: Makefile,v 1.5 2003/04/03 10:41:47 reddawg Exp $
# Application Makefile (C) 2002 The UbixOS Project


#Compiler
GCC = gcc
G++ = gcc

#Compiler Flags
CFLAGS = -DNOBOOL -fno-builtin -fno-rtti -fno-exceptions

#Linker
LD = ld

#Binary File Name
BINARY = muffin

#Delete Program
REMOVE = rm -f

#Objects
OBJS = main.o

#Libraries
LIBRARIES = ../../lib/libc/math/*.o ../../lib/libc/quad/*.o ../../lib/libc/stdio/*.o ../../lib/libc/stdlib/*.o ../../lib/libc/sys/*.o ../../lib/libc/string/*.o ../../lib/libc/generic/*.o ../../lib/libcpp/*.o ../../lib/views/*.o

#Include
INCLUDE = -I../../lib/libc/include -I../../lib/libcpp/include -I../../lib/views/include 

#Startup File
STARTUP = ../../lib/ubix/startup.o

# Link The Binary
$(BINARY) : $(OBJS)
	$(GCC) -nostdlib -o $@ $(STARTUP) $(LIBRARIES) $(OBJS)
	strip $(BINARY)

# Compile the source files
.cc.o:
	$(G++)  -Wall -fomit-frame-pointer -O $(CFLAGS) $(INCLUDE) -c -o $@ $<
 
.cc.s:
	$(G++)  -Wall -fomit-frame-pointer -O $(CFLAGS) $(INCLUDE) -S -o $@ $<
 
.c.o:
	$(GCC)  -Wall -O $(CFLAGS) $(INCLUDE) -c -o $@ $<
 
.c.s:
	$(GCC)  -Wall -fomit-frame-pointer -O $(CFLAGS) $(INCLUDE) -S -o $@ $<
 
.S.o:
	$(GCC)  -Wall -fomit-frame-pointer $(INCLUDE) -c -o $@ $<
 
# Clean Up The junk
clean:
	$(REMOVE) $(OBJS) $(BINARY)