-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
64 lines (54 loc) · 1.17 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
RM := rm -rf
SUBDIRS := \
src \
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS := \
./src/strategy.cpp \
./src/basic_types.cpp \
./src/component_management.cpp \
./src/component_types.cpp \
./src/instance.cpp \
./src/main.cpp \
./src/solver.cpp
OBJS := \
strategy.o \
basic_types.o \
component_management.o \
component_types.o \
instance.o \
main.o \
solver.o
CPP_DEPS := \
strategy.d \
basic_types.d \
component_management.d \
component_types.d \
instance.d \
main.d \
solver.d
%.o: ./src/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
g++ -O3 -std=c++11 -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
LIBS := -lgmpxx -lgmp
# All Target
all: SharpSSAT
# Tool invocations
SharpSSAT: $(OBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
g++ -L/usr/lib/ -o "SharpSSAT" $(OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(OBJS)$(CPP_DEPS) SharpSSAT
-@echo ' '
.PHONY: all clean dependents
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
endif