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

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [sw/] [dev/] [Makefile] - Diff between revs 15 and 29

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 15 Rev 29
Line 44... Line 44...
##
##
################################################################################
################################################################################
##
##
##
##
all:
all:
PROGRAMS := helloworld
PROGRAMS := helloworld doorbell doorbell2 kptest
all: $(OBJDIR)/ $(PROGRAMS)
all: $(OBJDIR)/ $(PROGRAMS)
 
 
 
 
OBJDIR := obj-zip
OBJDIR := obj-zip
CROSS := zip
CROSS := zip
Line 59... Line 59...
OBJDUMP := $(CROSS)-objdump
OBJDUMP := $(CROSS)-objdump
 
 
# Not for build, for for building tags and dependency files, we need to know
# Not for build, for for building tags and dependency files, we need to know
# what the sources and headers are
# what the sources and headers are
DEVDRVR:= keypad.c display.c rtcsim.c
DEVDRVR:= keypad.c display.c rtcsim.c
SOURCES:= helloworld.c doorbell.c doorbell2.c $(DEVDRVR)
SOURCES:= helloworld.c doorbell.c doorbell2.c kptest.c $(DEVDRVR)
HEADERS:= board.h
HEADERS:= board.h
# OBJECTS:= $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(SOURCES)))
# OBJECTS:= $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(SOURCES)))
OBJDRVR := $(addprefix $(OBJDIR)/,$(subst .c,.o,$(DEVDRVR)))
OBJDRVR := $(addprefix $(OBJDIR)/,$(subst .c,.o,$(DEVDRVR)))
 
 
 
 
Line 94... Line 94...
doorbell2: $(OBJDIR)/ $(OBJDIR)/doorbell2.o $(OBJDRVR) cmod.ld
doorbell2: $(OBJDIR)/ $(OBJDIR)/doorbell2.o $(OBJDRVR) cmod.ld
        $(CC) $(LDFLAGS) $(OBJDIR)/doorbell2.o $(OBJDRVR) -o $@
        $(CC) $(LDFLAGS) $(OBJDIR)/doorbell2.o $(OBJDRVR) -o $@
$(OBJDIR)/doorbell2.txt: doorbell2
$(OBJDIR)/doorbell2.txt: doorbell2
        $(OBJDUMP) -dr $^ > $@
        $(OBJDUMP) -dr $^ > $@
 
 
 
kptest: $(OBJDIR)/ $(OBJDIR)/kptest.o $(OBJDRVR) cmod.ld
 
        $(CC) $(LDFLAGS) $(OBJDIR)/kptest.o $(OBJDRVR) -o $@
 
$(OBJDIR)/kptest.txt: kptest
 
        $(OBJDUMP) -dr $^ > $@
 
 
define  build-depends
define  build-depends
        @echo "Building dependency file(s)"
        @echo "Building dependency file(s)"
        $(CC) $(CPPFLAGS) -MM $(SOURCES) > $(OBJDIR)/xdep.txt
        $(CC) $(CPPFLAGS) -MM $(SOURCES) > $(OBJDIR)/xdep.txt
        $(SED) -e 's/^.*.o: /$(OBJDIR)\/&/' < $(OBJDIR)/xdep.txt > $(OBJDIR)/depends.txt
        $(SED) -e 's/^.*.o: /$(OBJDIR)\/&/' < $(OBJDIR)/xdep.txt > $(OBJDIR)/depends.txt
        @rm $(OBJDIR)/xdep.txt
        @rm $(OBJDIR)/xdep.txt

powered by: WebSVN 2.1.0

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