summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--8/Makefile2
-rw-r--r--mk/c.mk10
-rw-r--r--opt/Makefile4
3 files changed, 7 insertions, 9 deletions
diff --git a/8/Makefile b/8/Makefile
index 8afa3e0..576cad7 100644
--- a/8/Makefile
+++ b/8/Makefile
@@ -4,7 +4,7 @@ OBJ=isel.o \
reduce.o \
regalloc.o \
-LIBDEPS=../parse/libparse.a ../opt/libopt.a
+DEPS=../parse/libparse.a ../opt/libopt.a
include ../mk/lexyacc.mk
include ../mk/c.mk
diff --git a/mk/c.mk b/mk/c.mk
index a2364ae..16b74fa 100644
--- a/mk/c.mk
+++ b/mk/c.mk
@@ -1,9 +1,9 @@
_DEPSDIR = .deps
_DEPS=$(addprefix $(_DEPSDIR)/, $(OBJ:.o=.d))
-_LIBSRCHPATHS=$(addprefix -L, $(dir $(LIBDEPS)))
-_LIBINCPATHS=$(addprefix -I, $(dir $(LIBDEPS)))
-_LIBPATHS=$(addprefix -l, $(patsubst lib%.a,%,$(notdir $(LIBDEPS))))
+_LIBSRCHPATHS=$(addprefix -L, $(dir $(DEPS)))
+_LIBINCPATHS=$(addprefix -I, $(dir $(DEPS)))
+_LIBPATHS=$(addprefix -l, $(patsubst lib%.a,%,$(notdir $(DEPS))))
CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
CFLAGS += -g
@@ -21,8 +21,8 @@ $(LIB): $(OBJ) libs
$(BIN): $(OBJ) $(EXTRADEP) libs
$(CC) -o $@ $(OBJ) $(_LIBSRCHPATHS) $(_LIBPATHS)
-libs: $(LIBDEPS)
- @for i in $(dir $(LIBDEPS)); do (\
+libs: $(DEPS)
+ @for i in $(dir $(DEPS)); do (\
cd $$i && \
$(MAKE) || \
exit 1 \
diff --git a/opt/Makefile b/opt/Makefile
index 7e6654c..636140a 100644
--- a/opt/Makefile
+++ b/opt/Makefile
@@ -2,9 +2,7 @@ LIB=libopt.a
OBJ=cfg.o \
df.o \
-CFLAGS+=-I../parse
-LDFLAGS+=-L../parse -lparse
-EXTRADEP=../parse/libparse.a
+DEPS=../parse/libparse.a
include ../mk/lexyacc.mk
include ../mk/c.mk