beercode20150806/Makefile

45 lines
1000 B
Makefile
Raw Normal View History

2015-08-06 20:24:40 +00:00
PROJECT= resume
SOURCES= src/cheapgmp.cpp src/accessories.cpp
MAINSRC= src/main.cpp
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
CMD=gmpcmd
2015-08-06 20:24:40 +00:00
TESTBINARY=testrunner
OBJECTS=$(SOURCES:.cpp=.o)
TESTOBJECTS=$(TESTSOURCES:.cpp=.o)
MAINOBJECTS=$(MAINSRC:.cpp=.o)
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)
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
rm -f $(BINARY) $(TESTBINARY) $(CMD)
2015-08-06 20:24:40 +00:00
clean:
rm -f $(OBJECTS) $(TESTOBJECTS) $(MAINOBJECTS) $(CMDOBJECTS)