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

Subversion Repositories zap

[/] [zap/] [trunk/] [src/] [scripts/] [makefile] - Diff between revs 41 and 43

Show entire file | Details | Blame | View Log

Rev 41 Rev 43
Line 34... Line 34...
 
 
.PHONY: clean
.PHONY: clean
.PHONY: c2asm
.PHONY: c2asm
.PHONY: compiler
.PHONY: compiler
.PHONY: dirs
.PHONY: dirs
.PHONY: cleanall
 
 
 
ARCH         := armv5t
ARCH         := armv5t
TC           := $(shell basename `pwd`)
TC           := $(shell basename `pwd`)
GCC_PATH     := ../../../obj/gcc-arm-none-eabi-*/bin/
 
SCRIPT_PATH  := ../../scripts/
SCRIPT_PATH  := ../../scripts/
C_FILES      := $(wildcard *.c)
C_FILES      := $(wildcard *.c)
S_FILES      := $(wildcard *.s)
S_FILES      := $(wildcard *.s)
H_FILES      := $(wildcard *.h)
H_FILES      := $(wildcard *.h)
LD_FILE      := $(wildcard *.ld)
LD_FILE      := $(wildcard *.ld)
COBJFILES    := $(patsubst %.c,../../../obj/ts/$(TC)/%_c.o,$(C_FILES))
COBJFILES    := $(patsubst %.c,../../../obj/ts/$(TC)/%_c.o,$(C_FILES))
AOBJFILES    := $(patsubst %.s,../../../obj/ts/$(TC)/%_s.o,$(S_FILES))
AOBJFILES    := $(patsubst %.s,../../../obj/ts/$(TC)/%_s.o,$(S_FILES))
GCC_SRC      := ../../../sw/gcc-arm-none-eabi-*-linux.tar.*
 
CFLAGS       := -c -msoft-float -mfloat-abi=soft -march=$(ARCH) -g
CFLAGS       := -c -msoft-float -mfloat-abi=soft -march=$(ARCH) -g
SFLAGS       := -march=$(ARCH) -g
SFLAGS       := -march=$(ARCH) -g
LFLAGS       := -T
LFLAGS       := -T
OFLAGS       := -O binary
OFLAGS       := -O binary
CC           := $(GCC_PATH)/arm-none-eabi-gcc
CC           := arm-none-eabi-gcc
AS           := $(GCC_PATH)/arm-none-eabi-as
AS           := arm-none-eabi-as
LD           := $(GCC_PATH)/arm-none-eabi-ld
LD           := arm-none-eabi-ld
OB           := $(GCC_PATH)/arm-none-eabi-objcopy
OB           := arm-none-eabi-objcopy
 
 
# This rule will convert every ASM to file its corresponding object file.
# This rule will convert every ASM to file its corresponding object file.
../../../obj/ts/$(TC)/%_s.o: %.s
../../../obj/ts/$(TC)/%_s.o: %.s
        $(AS) $(SFLAGS) $^ -o $@
        $(AS) $(SFLAGS) $^ -o $@
 
 
Line 80... Line 77...
 
 
# Rule to run the simulation.
# Rule to run the simulation.
all: dirs $(CC) ../../../obj/ts/$(TC)/zap_mem.v
all: dirs $(CC) ../../../obj/ts/$(TC)/zap_mem.v
        perl $(SCRIPT_PATH)/run_sim.pl +test+$(TC)
        perl $(SCRIPT_PATH)/run_sim.pl +test+$(TC)
 
 
 
$(CC):
$(AS):
$(AS):
$(LD):
$(LD):
$(OB):
$(OB):
 
 
$(CC): $(GCC_SRC)
 
        mkdir -p ../../../obj/ts/$(TC)/
 
        tar -xvf $(GCC_SRC) -C ../../../obj/
 
        touch $@
 
 
 
dirs:
dirs:
        bash ../../scripts/check_arc.sh
 
        mkdir -p ../../../obj/ts/$(TC)/
        mkdir -p ../../../obj/ts/$(TC)/
        touch ../../../obj/ts/$(TC)/
        touch ../../../obj/ts/$(TC)/
 
 
clean:
clean:
        mkdir -p ../../../obj/ts/$(TC)/
        mkdir -p ../../../obj/ts/$(TC)/
        rm -fv  ../../../obj/ts/$(TC)/*
        rm -fv  ../../../obj/ts/$(TC)/*
 
 
cleanall:
 
        rm -fv  ../../../obj/ts/$(TC)/*
 
        rm -rfv ../../../obj/ts/$(TC)/../../gcc-arm-none-*
 
 
 
c2asm:
c2asm:
        $(CC) -S $(CFLAGS) $(X) -o ../../../obj/ts/$(TC)/$(X).asm
        $(CC) -S $(CFLAGS) $(X) -o ../../../obj/ts/$(TC)/$(X).asm
 
 
print-%  : ; @echo $* = $($*)
print-%  : ; @echo $* = $($*)
 
 

powered by: WebSVN 2.1.0

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