Skip to content

Commit

Permalink
Use $(MAKE) instead of make in Makefiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Dec 30, 2024
1 parent 0774a84 commit 7c84910
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ static: $(LIB)/libsmax.a
# Run regression tests
.PHONY: test
test: shared static
make -f test.mk
$(MAKE) -f test.mk

# Build benchmark program
.PHONY: benchmark
benchmark: shared static
make -f test.mk benchmark
$(MAKE) -f test.mk benchmark

# 'test' + 'analyze'
.PHONY: check
Expand All @@ -61,11 +61,11 @@ check: test analyze
# Static code analysis via Facebook's infer
.PHONY: infer
infer: clean
infer run -- make shared
infer run -- $(MAKE) shared

.PHONY: tools
tools:
make -f tools.mk all
$(MAKE) -f tools.mk all

# Link tools against the static or shared libs
ifeq ($(STATICLINK),1)
Expand Down
6 changes: 3 additions & 3 deletions build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(OBJ)/%.o: %.c $(OBJ) Makefile

# Share library recipe
$(LIB)/%.so.$(SO_VERSION):
@make $(LIB)
@$(MAKE) $(LIB)
$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $^ -shared -fPIC -Wl,-soname,$(subst $(LIB)/,,$@) $(LDFLAGS)

# Unversioned shared libs (for linking against)
Expand All @@ -21,13 +21,13 @@ $(LIB)/lib%.so:

# Static library: *.a
$(LIB)/%.a:
@make $(LIB)
@$(MAKE) $(LIB)
ar -rc $@ $^
ranlib $@

# Simple binaries
$(BIN)/%: $(OBJ)/%.o
@make $(BIN)
@$(MAKE) $(BIN)
$(CC) -o $@ $^ $(LDFLAGS)

# Create sub-directories for build targets
Expand Down

0 comments on commit 7c84910

Please sign in to comment.