OpenCores
URL https://opencores.org/ocsvn/ion/ion/trunk

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [common/] [libsoc/] [makefile] - Blame information for rev 247

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 172 ja_rd
 
2
#-- Set up toolchain -- modify as needed ---------------------------------------
3
 
4
BIN_MIPS = C:/dev/embedded/SourceryGpp/mips-elf-11-03.52/bin
5
CC = $(BIN_MIPS)/mips-sde-elf-gcc.exe $(CFLAGS)
6
AS = $(BIN_MIPS)/mips-sde-elf-as
7
AR = $(BIN_MIPS)/mips-sde-elf-ar
8
LD = $(BIN_MIPS)/mips-sde-elf-ld
9
DUMP = $(BIN_MIPS)/mips-sde-elf-objdump
10
COPY = $(BIN_MIPS)/mips-sde-elf-objcopy
11
 
12
 
13
#-- Common variables -----------------------------------------------------------
14
 
15
CFLAGS  = -O2 -Wall -c -s -fno-builtin -nostdlib -nodefaultlibs \
16
          -msoft-float -mips1 -G0
17
 
18
#-- IMPORTANT: List of object files to be included in the library
19 178 ja_rd
OBJS    = hw_ion_mpu.o soc.o syscalls.o printf-stdarg.o \
20
          fp-bit-float.o fp-bit-double.o
21 172 ja_rd
 
22
SRC = ./src
23
 
24
#-- Targets & rules ------------------------------------------------------------
25
 
26
libsoc.a: $(OBJS)
27
        $(AR) rvs libsoc.a $(OBJS)
28
#       -@$(DUMP) -m mips --disassemble soc.o > soc.lst
29
 
30
soc.o:              $(SRC)/soc.h
31
printf-stdarg.o:
32
syscalls.o:         $(SRC)/soc.h
33
hw_ion_mpu.o:       $(SRC)/soc.h $(SRC)/hw.h
34 183 ja_rd
# The FP math library is compiled separately for float support...
35 178 ja_rd
fp-bit-float.o: $(SRC)/fp-bit.c
36
        $(CC) $(CFLAGS) -DFLOAT=1 $(SRC)/fp-bit.c -o fp-bit-float.o
37 183 ja_rd
# ...and for double support
38 178 ja_rd
fp-bit-double.o:
39
        $(CC) $(CFLAGS) $(SRC)/fp-bit.c -o fp-bit-double.o
40 172 ja_rd
 
41
#-- Let's make some implicit rules explicit for clarity (well, 'clarity')
42
 
43
%.o: $(SRC)/%.c
44
        $(CC) $(CFLAGS) $< -o $@
45
 
46
#-- And now the usual housekeeping stuff ---------------------------------------
47
 
48
.PHONY: clean
49
 
50
clean:
51
        -$(RM) *.o *.obj *.map *.lst *.hex *.exe *.axf *.code *.data *.bin
52
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.