diff options
author | Matt Strapp <matt@mattstrapp.net> | 2022-04-25 17:48:52 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2022-04-25 17:49:31 -0500 |
commit | 6889e2d66b710c241b3884fc28610a9e6be4e610 (patch) | |
tree | 30aabe5e28a4306c41d7d73a248ed174bd36f0a5 /Makefile | |
download | csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.gz csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.bz2 csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.lz csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.xz csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.zst csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.zip |
A
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8820f85 --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ + +.DELETE_ON_ERROR: + +CXX = g++ +SRCDIR := src +INCLDIR = include +BUILDDIR = build +CFLAGS := -Wall -Wextra -g + +all: client server + +client: $(BUILDDIR)/client.o + $(CXX) $(CFLAGS) $(BUILDDIR)/client.o $(BUILDDIR)/util.o $(BUILDDIR)/comms.o -o client + +server: $(BUILDDIR)/server.o + $(CXX) $(CFLAGS) $(BUILDDIR)/server.o $(BUILDDIR)/util.o $(BUILDDIR)/comms.o -o server + +$(BUILDDIR)/client.o: $(SRCDIR)/client.cpp $(INCLDIR)/client.hpp $(BUILDDIR)/comms.o $(BUILDDIR)/util.o + $(CXX) $(CFLAGS) -I$(INCLDIR) $(SRCDIR)/client.cpp -c -o $(BUILDDIR)/client.o + +$(BUILDDIR)/server.o: $(SRCDIR)/server.cpp $(INCLDIR)/server.hpp $(BUILDDIR)/comms.o $(BUILDDIR)/util.o + $(CXX) $(CFLAGS) -I$(INCLDIR) $(SRCDIR)/server.cpp -c -o $(BUILDDIR)/server.o + +$(BUILDDIR)/comms.o: $(SRCDIR)/comms.cpp $(INCLDIR)/comms.hpp $(BUILDDIR)/util.o + $(CXX) $(CFLAGS) -I$(INCLDIR) $(SRCDIR)/comms.cpp -c -o $(BUILDDIR)/comms.o + +$(BUILDDIR)/util.o: $(SRCDIR)/util.cpp $(INCLDIR)/util.hpp + $(CXX) $(CFLAGS) -I$(INCLDIR) -c $(SRCDIR)/util.cpp -o $(BUILDDIR)/util.o + +clean: + -rm client server $(BUILDDIR)/*.o 2> /dev/null || true + +.PHONY: all clean |