mirror of
https://bitbucket.org/Mattrixwv/cipherstream.git
synced 2025-12-06 18:33:58 -05:00
Removed Windows make info
This commit is contained in:
77
makefile
77
makefile
@@ -1,91 +1,44 @@
|
|||||||
#Macros that are corss platform
|
#A list of the ciphers that can be used
|
||||||
|
#This is used to create the libraries and for cpp files in the test version
|
||||||
|
CIPHERS = Caesar Playfair Vigenere Atbash Morse Autokey
|
||||||
|
#Other usefull macros
|
||||||
LIBFLAGS = -shared -std=c++11 -O3 -fPIC -Wall
|
LIBFLAGS = -shared -std=c++11 -O3 -fPIC -Wall
|
||||||
EXEFLAGS = -std=c++11 -O3
|
EXEFLAGS = -std=c++11 -O3
|
||||||
TESTFLAGS = -std=c++11 -DTEST_VERSION
|
TESTFLAGS = -std=c++11 -DTEST_VERSION
|
||||||
DEBUGFLAGS = $(TESTFLAGS) -g
|
DEBUGFLAGS = $(TESTFLAGS) -g
|
||||||
LIBDIR = ./lib
|
LIBDIR = ./lib
|
||||||
CIPHERS = Caesar Playfair Vigenere Atbash Morse Autokey
|
|
||||||
LIBFILES = $(patsubst %,SourceFiles/%.cpp,$(CIPHERS))
|
LIBFILES = $(patsubst %,SourceFiles/%.cpp,$(CIPHERS))
|
||||||
|
|
||||||
#For Linux
|
#Different portions to compile
|
||||||
allLinux: libsLinux CipherStream
|
#Using the simplest make command compiles all
|
||||||
testLinux: libsLinux CiphersTest
|
all: libs CipherStream
|
||||||
debugLinux: CiphersDBG
|
test: libs CiphersTest
|
||||||
libsLinux: directory $(patsubst %, $(LIBDIR)/lib%.a,$(CIPHERS))
|
debug: CiphersDBG
|
||||||
LINUXLIBS = $(patsubst %, -l%,$(CIPHERS))
|
libs: directory $(patsubst %, $(LIBDIR)/lib%.a,$(CIPHERS))
|
||||||
|
LIBS = $(patsubst %, -l%,$(CIPHERS))
|
||||||
#For Windows
|
|
||||||
allWindows: libsWindows CipherStream.exe
|
|
||||||
testWindows: libsWindows CiphersTest.exe
|
|
||||||
debugWindows: CipherDBG.exe
|
|
||||||
#Keeping the old one for now, until I can test it to make sure it works
|
|
||||||
#WindowsLibs: libCaesar.lib libPlayfair.lib libVigenere.lib libAtbash.lib
|
|
||||||
#WINDOWSLIBS = -llibCaesar -llibPlayfair -llibVigenere -llibAtbash
|
|
||||||
libsWindows: $(patsubst %, lib%.lib,$(CIPHERS))
|
|
||||||
WINDOWSLIBS = $(patsubst %, -llib%,$(CIPHERS))
|
|
||||||
|
|
||||||
|
|
||||||
directory:
|
directory:
|
||||||
mkdir -p $(LIBDIR)
|
mkdir -p $(LIBDIR)
|
||||||
|
|
||||||
|
|
||||||
#Linux
|
|
||||||
|
|
||||||
#Building Libraries
|
#Building Libraries
|
||||||
$(LIBDIR)/lib%.a: SourceFiles/%.cpp
|
$(LIBDIR)/lib%.a: SourceFiles/%.cpp
|
||||||
$(CXX) $(LIBFLAGS) -o $@ $<
|
$(CXX) $(LIBFLAGS) -o $@ $<
|
||||||
|
|
||||||
#Building Executables
|
#Building Executables
|
||||||
CipherStream: main.cpp helperFunctions.hpp
|
CipherStream: main.cpp helperFunctions.hpp
|
||||||
$(CXX) $(EXEFLAGS) -o $@ main.cpp -L $(LIBDIR) $(LINUXLIBS)
|
$(CXX) $(EXEFLAGS) -o $@ main.cpp -L $(LIBDIR) $(LIBS)
|
||||||
|
|
||||||
CiphersTest: main.cpp testMain.hpp
|
CiphersTest: main.cpp testMain.hpp
|
||||||
$(CXX) $(TESTFLAGS) -o $@ $< -L $(LIBDIR) $(LINUXLIBS)
|
$(CXX) $(TESTFLAGS) -o $@ $< -L $(LIBDIR) $(LIBS)
|
||||||
|
|
||||||
CiphersDBG: main.cpp testMain.hpp $(LIBFILES)
|
CiphersDBG: main.cpp testMain.hpp $(LIBFILES)
|
||||||
$(CXX) $(DEBUGFLAGS) -o $@ $< $(LIBFILES)
|
$(CXX) $(DEBUGFLAGS) -o $@ $< $(LIBFILES)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Windows
|
|
||||||
#Building Libraries
|
|
||||||
libCaesar.lib: SourceFiles/Caesar.cpp
|
|
||||||
g++ $(LIBFLAGS) -o $@ $<
|
|
||||||
|
|
||||||
libPlayfair.lib: SourceFiles/Playfair.cpp
|
|
||||||
g++ $(LIBFLAGS) -o $@ $<
|
|
||||||
|
|
||||||
libVigenere.lib: SourceFiles/Vigenere.cpp
|
|
||||||
g++ $(LIBFLAGS) -o $@ $<
|
|
||||||
|
|
||||||
libAtbash.lib: SourceFiles/Atbash.cpp
|
|
||||||
g++ $(LIBFLAGS) -o $@ $<
|
|
||||||
|
|
||||||
libAutokey.lib: SourceFiles/Autokey.cpp libVigenere.lib
|
|
||||||
g++ $(LIBFLAGS) -o $@ $< -L./ -llibVigenere
|
|
||||||
|
|
||||||
libMorse.lib: SourceFiles/Morse.cpp
|
|
||||||
g++ $(LIBFLAGS) -o $@ $<
|
|
||||||
|
|
||||||
#Building Executables
|
|
||||||
CipherStream.exe: main.cpp helperFunctions.hpp
|
|
||||||
g++ $(EXEFLAGS) -o $@ main.cpp -L./ $(WINDOWSLIBS)
|
|
||||||
|
|
||||||
CiphersTest.exe: main.cpp testMain.hpp
|
|
||||||
g++ $(TESTFLAGS) -o $@ $< -L./ $(WINDOWSLIBS)
|
|
||||||
|
|
||||||
CiphersDBG.exe: main.cpp testMain.hpp $(LIBFILES)
|
|
||||||
g++ $(DEBUGFLAGS) -o $@ $< $(LIBFILES)
|
|
||||||
|
|
||||||
|
|
||||||
#Cleaning Shop
|
#Cleaning Shop
|
||||||
.PHONY: cleanLinux
|
.PHONY: clean
|
||||||
.PHONY: cleanWindows
|
|
||||||
|
|
||||||
#Linux Remove
|
#Linux Remove
|
||||||
cleanLinux:
|
clean:
|
||||||
rm -f lib/*.a Cipher*
|
rm -f lib/*.a Cipher*
|
||||||
|
|
||||||
#Windows Remove
|
|
||||||
cleanWindows:
|
|
||||||
rm -f *.lib Cipher*.exe
|
|
||||||
|
|||||||
Reference in New Issue
Block a user