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 |
---|
14 | DIR_BIN = $(MORPHEO_TMP)/bin |
---|
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 | |
---|
35 | OBJECTS = $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(wildcard $(DIR_SRC)/*.cpp))))) \ |
---|
36 | $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(wildcard $(DIR_SRC)/*.c))))) |
---|
37 | OBJECTS_BIN = $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(wildcard $(DIR_TST)/*.cpp))))) |
---|
38 | |
---|
39 | HEADERS = $(wildcard $(DIR_INC)/*.h) |
---|
40 | |
---|
41 | EXE = $(DIR_BIN)/soft.x |
---|
42 | |
---|
43 | EXEC_PREFIX = |
---|
44 | #$(VALGRIND) |
---|