Commit c6ac458e authored by Josh Kunz's avatar Josh Kunz

Updates build system to be a little easier to use.

parent 4f8f8d45
......@@ -8,24 +8,27 @@ libsrc = lib
srvsrc = server
clisrc = client
$(libsrc)/%.cma:
srvbin = nagad
$(srvbin):
$(MAKE) -C $(srvsrc) $@
cp $(srvsrc)/$@ .
%.cma:
@echo "****************** Error ********************"
@echo "It looks like you haven't set up the required"
@echo "libraries yet (missing $@)."
@echo "You can build them by running:"
@echo " $$ make libs"
@echo "From the root of the repository. This is split"
@echo "into a seperate command because it clones"
@echo "repositories off of the internet by running:"
@echo " $$ git submodule init"
@echo " $$ git submodule update"
@echo " $$ make libs"
@echo "From the root of the repository."
@exit 1
libs:
git submodule init
git submodule update
$(MAKE) -C $(libsrc) libs
clean:
$(MAKE) -C $(libsrc) clean
$(MAKE) -C $(srvsrc) clean
-rm $(srvbin)
......@@ -19,7 +19,7 @@ abs_libs = $(addprefix $(libloc)/,$(addsuffix .cma,$(local_libs)))
default: $(bin)
$(abs_libs):
$(foreach lib,$(addsuffix .cma,$(local_libs)),$(MAKE) -C $(libloc) $(lib);)
$(foreach lib,$(addsuffix .cma,$(local_libs)),$(MAKE) -C .. $(lib);)
$(depfile): $(sources)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment