1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-23 18:12:24 +02:00
wernermisc/m1/perf/Makefile

48 lines
1014 B
Makefile
Raw Normal View History

M1=/home/qi/m1
COMPILER_DIR=$(M1)/flickernoise/src
M1SWINC_DIR=$(M1)/milkymist/software/include
M1SWLIB_DIR=$(M1)/milkymist/software/libfpvm
#CFLAGS_EXTRA=-DCOMP_DEBUG
CFLAGS_EXTRA=
CFLAGS_PROF=-pg
CFLAGS_COMMON=-Wall -g $(CFLAGS_PROF) $(CFLAGS_EXTRA)
CFLAGS=$(CFLAGS_COMMON) \
-I$(COMPILER_DIR) \
-Ifakes -I$(M1SWINC_DIR)
LDFLAGS=-pg
LDLIBS=-L$(M1SWLIB_DIR) -lfpvm
COMPILER_O = $(COMPILER_DIR)/compiler.o
LIBFPVM_A = $(M1SWLIB_DIR)/libfpvm.a
OBJS = main.o $(COMPILER_O)
.PHONY: all clean spotless path
all: main
main: $(OBJS) $(LIBFPVM_A)
$(COMPILER_O):
$(MAKE) -C $(COMPILER_DIR) CC=gcc \
CFLAGS="$(CFLAGS_COMMON) -I$(M1SWINC_DIR) \
-I$(shell pwd)/fakes" \
compiler.o
$(LIBFPVM_A):
$(MAKE) -C $(M1SWLIB_DIR) CC=gcc LD=gcc AR=ar RANLIB=ranlib \
CFLAGS='$(CFLAGS_COMMON) $$(INCLUDES)'
clean:
$(MAKE) -C $(M1SWLIB_DIR) clean
$(MAKE) -C $(COMPILER_DIR) clean
2011-09-18 13:45:17 +03:00
rm -f $(M1SWLIB_DIR)/sched.o
rm -f $(OBJS)
spotless: clean
rm -f main
path:
@echo $(M1)