forked from stevemonaco/Atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (47 loc) · 1.3 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
62
63
64
65
66
67
68
69
SRCDIR = .
EXES = atlas
### atlas sources and settings
ATLAS_MODULE = atlas
ATLAS_CXX_SRCS = AtlasCore.cpp \
AtlasExtension.cpp \
AtlasFile.cpp \
AtlasLogger.cpp \
AtlasMain.cpp \
AtlasParser.cpp \
AtlasStats.cpp \
AtlasTypes.cpp \
GenericVariable.cpp \
Pointer.cpp \
PointerHandler.cpp \
Table.cpp
ATLAS_LIBRARIES = dl \
ncurses
ATLAS_OBJS = $(ATLAS_CXX_SRCS:.cpp=.o)
### Global source lists
CXX_SRCS = $(ATLAS_CXX_SRCS)
### Tools
CXX = g++
### Generic targets
all: $(EXES)
### Build rules
.PHONY: all clean dummy
$(SUBDIRS): dummy
@cd $@ && $(MAKE)
# Implicit rules
.SUFFIXES: .cpp
DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<
# Rules for cleaning
CLEAN_FILES = y.tab.c y.tab.h lex.yy.c core *.orig *.rej \
\\\#*\\\# *~ *% .\\\#*
clean::
$(RM) $(CLEAN_FILES) $(CXX_SRCS:.cpp=.o)
$(RM) $(LIBS) $(EXES)
$(SUBDIRS:%=%/__clean__): dummy
cd `dirname $@` && $(MAKE) clean
$(EXTRASUBDIRS:%=%/__clean__): dummy
-cd `dirname $@` && $(RM) $(CLEAN_FILES)
### Target specific build rules
$(ATLAS_MODULE): $(ATLAS_OBJS)
$(CXX) $(ATLAS_LDFLAGS) -o $@ $(ATLAS_OBJS) $(ATLAS_LIBRARIES:%=-l%)