2015-08-06 20:24:40 +00:00
|
|
|
PROJECT= resume
|
|
|
|
SOURCES= src/cheapgmp.cpp src/accessories.cpp
|
|
|
|
MAINSRC= src/main.cpp
|
2015-08-09 17:51:44 +00:00
|
|
|
CMDSRC= src/cmd.cpp
|
2015-08-06 20:24:40 +00:00
|
|
|
TESTSOURCES= tests/test_cheapgmp.cpp
|
|
|
|
LDFLAGS=
|
|
|
|
TESTLDFLAGS= -laeryn_tests -laeryn_core
|
2016-07-23 00:10:01 +00:00
|
|
|
|
|
|
|
# Enable __USE_MISC if you're using clang
|
|
|
|
CFLAGS= -c -Wall -std=c++11 # -D__USE_MISC
|
2015-08-06 20:24:40 +00:00
|
|
|
CPLUSPLUS= g++
|
|
|
|
BINARY=cheapgmp
|
2015-08-09 17:51:44 +00:00
|
|
|
CMD=gmpcmd
|
2015-08-06 20:24:40 +00:00
|
|
|
TESTBINARY=testrunner
|
|
|
|
|
|
|
|
OBJECTS=$(SOURCES:.cpp=.o)
|
|
|
|
TESTOBJECTS=$(TESTSOURCES:.cpp=.o)
|
|
|
|
MAINOBJECTS=$(MAINSRC:.cpp=.o)
|
2015-08-09 17:51:44 +00:00
|
|
|
CMDOBJECTS=$(CMDSRC:.cpp=.o)
|
2015-08-06 20:24:40 +00:00
|
|
|
|
|
|
|
all: $(SOURCES) $(BINARY)
|
|
|
|
|
|
|
|
$(BINARY): $(OBJECTS) $(MAINOBJECTS)
|
|
|
|
$(CPLUSPLUS) $(OBJECTS) $(MAINOBJECTS) $(LDFLAGS) -o $@
|
|
|
|
|
|
|
|
app: $(BINARY)
|
|
|
|
|
2015-08-09 17:51:44 +00:00
|
|
|
gmpcmd: $(CMDOBJECTS) $(OBJECTS)
|
|
|
|
$(CPLUSPLUS) $(OBJECTS) $(CMDOBJECTS) $(LDFLAGS) -o $@
|
|
|
|
|
2015-08-06 20:24:40 +00:00
|
|
|
testrunner: $(OBJECTS) $(TESTOBJECTS)
|
|
|
|
$(CPLUSPLUS) $(OBJECTS) $(TESTOBJECTS) $(LDFLAGS) $(TESTLDFLAGS) -o $@
|
|
|
|
|
|
|
|
.cpp.o:
|
|
|
|
$(CPLUSPLUS) $(CFLAGS) $< -o $@
|
|
|
|
|
|
|
|
test: $(BINARY)
|
|
|
|
./$(BINARY)
|
|
|
|
|
|
|
|
distclean: clean
|
2015-08-09 17:51:44 +00:00
|
|
|
rm -f $(BINARY) $(TESTBINARY) $(CMD)
|
2015-08-06 20:24:40 +00:00
|
|
|
|
|
|
|
clean:
|
2015-08-09 17:51:44 +00:00
|
|
|
rm -f $(OBJECTS) $(TESTOBJECTS) $(MAINOBJECTS) $(CMDOBJECTS)
|