-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
62 lines (49 loc) · 2.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
TARGET_ARCH = linux
CC = g++
OPT = #-O2
QT3 = -DQT3_SUPPORT
DEBUG = -g #-DDEBUG_GSYSC
#OTHER = -Wall -Wno-deprecated
OTHER = -Wno-deprecated -fpermissive -DSC_USE_SC_STRING_OLD
CFLAGS = $(OPT) $(QT3) $(OTHER) $(DEBUG)
## Variable that points to SystemC installation path
SYSTEMC = /opt/systemc-2.3.2
LIB_SYSTEMC=$(SYSTEMC)/lib-linux64/libsystemc.a
# other necessary path variables:
QT_DIR = /usr/include/qt4
MOC_DIR = /usr/share/qt4
INCDIR = -I$(SYSTEMC)/include -I$(QT_DIR)
LIBDIR = -L/usr/lib -L$(QT_DIR)
####################################################################
SRCS = gsysConnection.cc gsysHierarchy.cc gsysHierarchyTree.cc gsysHierarchyWindow.cc gsysRegister.cc \
gsysMain.cc gsysMainGUI.cc gsysPort.cc gsysSignal.cc gsysSimulator.cc \
gsysPortViewer.cc gsysSignalViewer.cc gsysCanvasView.cc gsysAbout.cc gsysBuffer.cc gsysReplaced.cc
OBJS = gsysConnection.o gsysHierarchy.o gsysHierarchyTree.o gsysHierarchyWindow.o gsysRegister.o \
gsysMain.o gsysMainGUI.o gsysPort.o gsysSignal.o gsysSimulator.o \
gsysPortViewer.o gsysSignalViewer.o gsysCanvasView.o gsysAbout.o gsysBuffer.o gsysReplaced.o
HEAD = gsysConnection.h gsysHierarchy.h gsysHierarchyTree.h gsysHierarchyWindow.h \
gsysMain.h gsysMainGUI.h gsysPort.h gsysSignal.h gsysSimulator.h gsysc.h \
gsysPortViewer.h gsysSignalViewer.h gsysCanvasView.h gsysAbout.h gsysBuffer.h gsysReplaced.h
MOC= gsysAbout.moc gsysBuffer.moc gsysCanvasView.moc gsysHierarchyTree.moc gsysHierarchyWindow.moc gsysMainGUI.moc \
gsysPortViewer.moc gsysSignalViewer.moc gsysSimulator.moc
# libraries to link
EXTRA_LIBS = -lqt-mt -lpthread
LIBS = -lsystemc -lm $(EXTRA_LIBS)
# rule to create everything
all: lib wrapper
# rule to create library package
lib: $(MOC) $(OBJS) $(HEAD) $(LIB_SYSTEMC)
ar cru libgsysc.a $(OBJS)
# rule to create MetaObject-files; necessary for Qt
$(MOC): %.moc: %.h
$(MOC_DIR)/bin/moc $< -o $@
# rule to create object files
.cc.o: $(MOC) $(HEAD)
$(CC) $(CFLAGS) $(INCDIR) -c $<
# rule to compile wrapper
wrapper: gsysWrapper.cc
$(CC) $(CFLAGS) $(INCDIR) gsysWrapper.cc -o wrapper
# delete all created files
.PHONY: clean
clean::
rm -f $(OBJS) *~ $(EXE) core libgsysc.a *.moc wrapper