mirror of
https://bitbucket.org/Mattrixwv/cipherstream.git
synced 2026-02-03 19:22:29 -05:00
Modified to allow definition of test version to be made during compiling
This commit is contained in:
1
main.cpp
1
main.cpp
@@ -14,7 +14,6 @@
|
||||
|
||||
|
||||
///Test definitions
|
||||
#define TEST_VERSION
|
||||
|
||||
#ifdef TEST_VERSION
|
||||
#define CAESAR_TEST
|
||||
|
||||
25
makefile
25
makefile
@@ -1,18 +1,27 @@
|
||||
#For Linux
|
||||
All: libCaesar.a libPlayfair.a Ciphers
|
||||
LinuxAll: libCaesar.a libPlayfair.a Ciphers
|
||||
LinuxTest: libCaesar.a libPlayfair.a CiphersTest
|
||||
LinuxDebug: CiphersDBG
|
||||
|
||||
#For Windows
|
||||
WindowsAll: libCaesar.lib libPlayfair.lib Ciphers.exe
|
||||
|
||||
WindowsTest: libCaesar.lib libPlayfair.lib CiphersTest.exe
|
||||
WindowsDebug: CipherDBG.exe
|
||||
|
||||
libCaesar.a: SourceFiles/Caesar.cpp
|
||||
(CXX) -shared -std=c++11 -O3 -fPIC -o $@ $<
|
||||
$(CXX) -shared -std=c++11 -O3 -fPIC -o $@ $<
|
||||
|
||||
libPlayfair.a: SourceFiles/Playfair.cpp
|
||||
(CXX) -shared -std=c++11 -O3 -fPIC -o $@ $<
|
||||
$(CXX) -shared -std=c++11 -O3 -fPIC -o $@ $<
|
||||
|
||||
Ciphers: main.cpp
|
||||
(CXX) -O3 -std=c++11 -o $@ $< -lCaesar -lPlayfair
|
||||
$(CXX) -O3 -std=c++11 -o $@ $< -L ./ -lCaesar -lPlayfair
|
||||
|
||||
CiphersTest: main.cpp
|
||||
$(CXX) -O3 -std=c++11 -DTEST_VERSION -o Ciphers $< -L ./ -lCaesar -lPlayfair
|
||||
|
||||
CiphersDBG: main.cpp SourceFiles/Caesar.cpp SourceFiles/Playfair.cpp
|
||||
$(CXX) -O3 -std=c++11 -g -DTEST_VERSION -o $@ $<
|
||||
|
||||
#Linux
|
||||
libCaesar.lib: SourceFiles/Caesar.cpp
|
||||
@@ -23,3 +32,9 @@ libPlayfair.lib: SourceFiles/Caesar.cpp
|
||||
|
||||
Ciphers.exe: main.cpp
|
||||
g++ -std=c++11 -O3 -o $@ $< -L ./ -llibCaesar -llibPlayfair
|
||||
|
||||
CiphersTest.exe: main.cpp
|
||||
g++ -std=c++11 -O3 -DTEST_VERSION -o Ciphers.exe $< -L ./ -llibCaesar -llibPlayfair
|
||||
|
||||
CiphersDBG.exe: main.cpp
|
||||
g++ -std=c++11 -O3 -g -DTEST_VERSION -o $@ $< SourceFiles/Caesar.cpp SourceFiles/Playfair.cpp
|
||||
|
||||
Reference in New Issue
Block a user