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 ...@@ -8,24 +8,27 @@ libsrc = lib
srvsrc = server srvsrc = server
clisrc = client clisrc = client
$(libsrc)/%.cma: srvbin = nagad
$(srvbin):
$(MAKE) -C $(srvsrc) $@
cp $(srvsrc)/$@ .
%.cma:
@echo "****************** Error ********************" @echo "****************** Error ********************"
@echo "It looks like you haven't set up the required" @echo "It looks like you haven't set up the required"
@echo "libraries yet (missing $@)." @echo "libraries yet (missing $@)."
@echo "You can build them by running:" @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 init"
@echo " $$ git submodule update" @echo " $$ git submodule update"
@echo " $$ make libs" @echo " $$ make libs"
@echo "From the root of the repository."
@exit 1
libs: libs:
git submodule init
git submodule update
$(MAKE) -C $(libsrc) libs $(MAKE) -C $(libsrc) libs
clean: clean:
$(MAKE) -C $(libsrc) clean $(MAKE) -C $(libsrc) clean
$(MAKE) -C $(srvsrc) clean $(MAKE) -C $(srvsrc) clean
-rm $(srvbin)
...@@ -19,7 +19,7 @@ abs_libs = $(addprefix $(libloc)/,$(addsuffix .cma,$(local_libs))) ...@@ -19,7 +19,7 @@ abs_libs = $(addprefix $(libloc)/,$(addsuffix .cma,$(local_libs)))
default: $(bin) default: $(bin)
$(abs_libs): $(abs_libs):
$(foreach lib,$(addsuffix .cma,$(local_libs)),$(MAKE) -C $(libloc) $(lib);) $(foreach lib,$(addsuffix .cma,$(local_libs)),$(MAKE) -C .. $(lib);)
$(depfile): $(sources) $(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