diff --git a/doc/Makefile b/doc/Makefile index 5a4746e4..fd1f1b72 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,18 +1,19 @@ # Minimal makefile for Sphinx documentation +.DEFAULT_GOAL := help + # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build SOURCEDIR = . BUILDDIR = _build -# Put it first so that "make" without argument is like "make help". +.PHONY: help help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -.PHONY: help Makefile - # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +.PHONY: Makefile %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/sample/Makefile b/sample/Makefile index c6ca7568..d51b1545 100644 --- a/sample/Makefile +++ b/sample/Makefile @@ -4,6 +4,7 @@ COMMON=-O2 -I../include -L../lib -std=c++17 -pthread -Wl,-no-as-needed -Wl,-rpath,'$$ORIGIN'/../lib +.PHONY: all all: $(CXX) $(COMMON) testxml.cc -lmujoco -o ../bin/testxml $(CXX) $(COMMON) testspeed.cc -lmujoco -o ../bin/testspeed diff --git a/sample/Makefile.macos b/sample/Makefile.macos index ba5b6093..b9f4e594 100644 --- a/sample/Makefile.macos +++ b/sample/Makefile.macos @@ -10,6 +10,7 @@ CFLAGS=-O2 -F$(MUJOCOPATH) -I$(GLFWROOT)/include -pthread CXXFLAGS=$(CFLAGS) -std=c++17 -stdlib=libc++ ALLFLAGS=$(CXXFLAGS) -L$(GLFWROOT)/lib -Wl,-rpath,$(MUJOCOPATH) +.PHONY: all all: clang++ $(ALLFLAGS) testxml.cc -framework mujoco -o testxml clang++ $(ALLFLAGS) testspeed.cc -framework mujoco -o testspeed diff --git a/sample/Makefile.windows b/sample/Makefile.windows index 6bbc028a..c6ba0fae 100644 --- a/sample/Makefile.windows +++ b/sample/Makefile.windows @@ -8,6 +8,7 @@ COMMON=/O2 /MT /EHsc /arch:AVX /I../include /Fe../bin/ +.PHONY: all all: cl $(COMMON) testxml.cc ../lib/mujoco.lib cl $(COMMON) testspeed.cc ../lib/mujoco.lib