ref: 11385152552eac0cd03252b8d7012fac85464049
parent: 4d3165baf5b6de775d55ad82a1ae754d6e6e86d3
author: Ismael Luceno <ismael@iodev.co.uk>
date: Fri Mar 18 14:04:53 EDT 2022
Use $(@D) instead of $(dir $@)
--- a/Makefile
+++ b/Makefile
@@ -75,27 +75,27 @@
jsdump.c: astnames.h opnames.h
$(OUT)/%.o: %.c $(HDRS)
- @ mkdir -p $(dir $@)
+ @ mkdir -p $(@D)
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
$(OUT)/libmujs.o: one.c $(HDRS)
- @ mkdir -p $(dir $@)
+ @ mkdir -p $(@D)
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
$(OUT)/libmujs.a: $(OUT)/libmujs.o
- @ mkdir -p $(dir $@)
+ @ mkdir -p $(@D)
$(AR) cr $@ $^
$(OUT)/libmujs.$(SO_EXT): one.c $(HDRS)
- @ mkdir -p $(dir $@)
+ @ mkdir -p $(@D)
$(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -shared $(LDFLAGS) -o $@ $< -lm
$(OUT)/mujs: $(OUT)/libmujs.o $(OUT)/main.o
- @ mkdir -p $(dir $@)
+ @ mkdir -p $(@D)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBREADLINE) -lm
$(OUT)/mujs-pp: $(OUT)/libmujs.o $(OUT)/pp.o
- @ mkdir -p $(dir $@)
+ @ mkdir -p $(@D)
$(CC) $(LDFLAGS) -o $@ $^ -lm
.PHONY: $(OUT)/mujs.pc