1 | ifeq ($(origin MORPHEO_TOPLEVEL), undefined) |
---|
2 | $(error "variable MORPHEO_TOPLEVEL is undefined"); |
---|
3 | else |
---|
4 | include $(MORPHEO_TOPLEVEL)/Makefile.tools |
---|
5 | include $(MORPHEO_TOPLEVEL)/Makefile.flags |
---|
6 | endif |
---|
7 | |
---|
8 | #-----[ Directory ]---------------------------------------- |
---|
9 | DIR_TMP = $(MORPHEO_TMP) |
---|
10 | DIR_TST = selftest |
---|
11 | DIR_INC = include |
---|
12 | DIR_SRC ?= $(DIR_ENVIRONMENT)/$(ENTITY)/src |
---|
13 | DIR_OBJ = $(MORPHEO_TMP)/obj/$(MORPHEO_TYPE) |
---|
14 | DIR_BIN = $(MORPHEO_TMP)/bin/$(MORPHEO_TYPE) |
---|
15 | |
---|
16 | #-----[ Compilation ]-------------------------------------- |
---|
17 | INCDIR = $(SYSTEMC_INCDIR_$(SIMULATOR_SYSTEMC)) \ |
---|
18 | -I$(DIR_INC) \ |
---|
19 | -I../processor/Morpheo |
---|
20 | |
---|
21 | LIBDIR = $(SYSTEMC_LIBDIR_$(SIMULATOR_SYSTEMC)) |
---|
22 | |
---|
23 | LIBNAME = -lbfd \ |
---|
24 | -liberty \ |
---|
25 | $(SYSTEMC_LIBNAME_$(SIMULATOR_SYSTEMC)) |
---|
26 | |
---|
27 | FLAGS = $(SYSTEMC_CFLAGS_$(SIMULATOR_SYSTEMC)) |
---|
28 | |
---|
29 | MORPHEO_CC_FLAGS = $(MORPHEO_FLAGS) $(CC_FLAGS) $(INCDIR) |
---|
30 | MORPHEO_CXX_FLAGS = $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(INCDIR) |
---|
31 | MORPHEO_L_FLAGS = $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(LIBDIR) |
---|
32 | |
---|
33 | #-----[ Variable ]----------------------------------------- |
---|
34 | PREFIX_OBJ = $(ENTITY)_ |
---|
35 | |
---|
36 | OBJECTS = $(addprefix $(DIR_OBJ)/$(PREFIX_OBJ), $(addsuffix .o, $(basename $(notdir $(wildcard $(DIR_SRC)/*.cpp))))) \ |
---|
37 | $(addprefix $(DIR_OBJ)/$(PREFIX_OBJ), $(addsuffix .o, $(basename $(notdir $(wildcard $(DIR_SRC)/*.c))))) |
---|
38 | OBJECTS_BIN = $(addprefix $(DIR_OBJ)/$(PREFIX_OBJ), $(addsuffix .o, $(basename $(notdir $(wildcard $(DIR_TST)/*.cpp))))) |
---|
39 | |
---|
40 | HEADERS = $(wildcard $(DIR_INC)/*.h) |
---|
41 | |
---|
42 | EXE = $(DIR_BIN)/soft.x |
---|
43 | |
---|
44 | EXEC_PREFIX = |
---|
45 | #$(VALGRIND) |
---|