-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
71 lines (56 loc) · 1.47 KB
/
Makefile.in
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
70
71
# Programs
CXX=@CXX@
TAR=tar
# Program parameters
CPPFLAGS=@CPPFLAGS@
CXXFLAGS=@CXXFLAGS@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
# Configure flags
USE_INSTALLED_OMEGA=@ac_with_omega@
INCLUDES=src/C_omega.h
OMEGA_DIR=src/the-omega-project
OMEGA_LIB=$(OMEGA_DIR)/omega_lib/obj/libomega.a
OMEGA_MAKE_FLAGS= \
CONFIGURE_CXXFLAGS="$(CPPFLAGS) $(CXXFLAGS)" \
CONFIGURE_LDFLAGS="$(LDFLAGS)" \
CONFIGURE_LIBS="$(LIBS)" \
CONFIGURE_CXX="$(CXX)"
# If we're building the Omega library, then include its headers
ifeq ($(USE_INSTALLED_OMEGA),yes)
OMEGA_INCLUDE=
else
OMEGA_INCLUDE=-I$(OMEGA_DIR)/basic/include -I$(OMEGA_DIR)/omega_lib/include
endif
# If we're building the Omega library, then add it as a target
# our interface file
ifeq ($(USE_INSTALLED_OMEGA),yes)
BUILD_OMEGA_TARGET=
BUILD_OMEGA_DEP=
else
BUILD_OMEGA_TARGET=$(OMEGA_DIR) $(OMEGA_LIB)
BUILD_OMEGA_DEP=$(OMEGA_DIR)
endif
##
## RULES
##
.PHONY: all clean
all : $(BUILD_OMEGA_TARGET) build/C_omega.o
clean :
@echo Making clean...
ifeq ($(USE_INSTALLED_OMEGA),no)
rm -rf $(OMEGA_DIR)
endif
# The above is a more drastic way to clean than
# cd src && $(MAKE) veryclean $(OMEGA_MAKE_FLAGS)
build :
mkdir $@
build/C_omega.o : src/C_omega.cc build $(INCLUDES) $(BUILD_OMEGA_DEP)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(OMEGA_INCLUDE) -c $< -o $@
$(OMEGA_DIR) :
cd src && \
$(TAR) -xzf the-omega-project.tar.gz
$(OMEGA_LIB) : $(OMEGA_DIR)
cd $(OMEGA_DIR) && \
$(MAKE) depend $(OMEGA_MAKE_FLAGS) && \
$(MAKE) libomega.a $(OMEGA_MAKE_FLAGS)