aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/depend.mk2
-rw-r--r--mk/lib.mk6
-rw-r--r--mk/prog.mk6
3 files changed, 7 insertions, 7 deletions
diff --git a/mk/depend.mk b/mk/depend.mk
index 44af3782..873b0ca3 100644
--- a/mk/depend.mk
+++ b/mk/depend.mk
@@ -6,7 +6,7 @@ IGNOREFILES+= .depend
.depend: ${SRCS}
rm -f .depend
- ${CC} ${CPPFLAGS} -MM ${SRCS} > .depend
+ ${CC} ${LOCAL_CPPFLAGS} ${CPPFLAGS} -MM ${SRCS} > .depend
depend: .depend extra_depend
diff --git a/mk/lib.mk b/mk/lib.mk
index 1cf006c4..61a79ca9 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -21,10 +21,10 @@ _LIBS+= ${SHLIB_NAME}
CLEANFILES+= ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK}
%.o: %.c
- ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
+ ${CC} ${LOCAL_CFLAGS} ${LOCAL_CPPFLAGS} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
%.So: %.c
- ${CC} ${PICFLAG} -DPIC ${CPPFLAGS} ${CFLAGS} -c $< -o $@
+ ${CC} ${PICFLAG} -DPIC ${LOCAL_CFLAGS} ${LOCAL_CPPFLAGS} ${CPPFLAGS} ${CFLAGS} -c $< -o $@
all: depend ${_LIBS}
@@ -40,7 +40,7 @@ ${SHLIB_NAME}: ${SOBJS}
@${ECHO} building shared library $@
@rm -f $@ ${SHLIB_LINK}
@ln -fs $@ ${SHLIB_LINK}
- ${CC} ${CFLAGS} ${LDFLAGS} -shared -Wl,-x \
+ ${CC} ${LOCAL_CFLAGS} ${CFLAGS} ${LOCAL_LDFLAGS} ${LDFLAGS} -shared -Wl,-x \
-o $@ -Wl,-soname,${SONAME} \
${SOBJS} ${LDADD}
diff --git a/mk/prog.mk b/mk/prog.mk
index d4c32520..1c829b17 100644
--- a/mk/prog.mk
+++ b/mk/prog.mk
@@ -1,4 +1,4 @@
-# rules to build a library
+# rules to build a program
# based on FreeBSD's bsd.prog.mk
# Copyright (c) 2008 Roy Marples <roy@marples.name>
@@ -25,10 +25,10 @@ CLEANFILES+= ${OBJS} ${PROG}
all: depend ${PROG}
%.o: %.c
- ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
+ ${CC} ${LOCAL_CFLAGS} ${LOCAL_CPPFLAGS} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
${PROG}: ${SCRIPTS} ${OBJS}
- ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${LDADD}
+ ${CC} ${LOCAL_CFLAGS} ${LOCAL_LDFLAGS} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${LDADD}
clean:
rm -f ${CLEANFILES}