diff --git a/lib/libpanel/Makefile b/lib/libpanel/Makefile index f9733db4aeeb..5c1f6010dda2 100644 --- a/lib/libpanel/Makefile +++ b/lib/libpanel/Makefile @@ -16,8 +16,13 @@ SRCS= ncurses_def.h \ INCS= ${NCURSES}/panel/panel.h CLEANFILES+= ncurses_def.h -CFLAGS+= -I. -I${.CURDIR}/../libncurses -I${NCURSES}/panel -I${NCURSES}/include \ - -Wall -DNDEBUG -DHAVE_CONFIG_H +CFLAGS+= -I. +.if exists(${.OBJDIR}/../libncurses) +CFLAGS+= -I${.OBJDIR}/../libncurses +.endif +CFLAGS+= -I${.CURDIR}/../libncurses +CFLAGS+= -I${NCURSES}/panel -I${NCURSES}/include -I${NCURSES}/ncurses \ + -Wall -DNDEBUG -DHAVE_CONFIG_H ncurses_def.h: MKncurses_def.sh ncurses_defs AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \ diff --git a/lib/ncurses/panel/Makefile b/lib/ncurses/panel/Makefile index f9733db4aeeb..5c1f6010dda2 100644 --- a/lib/ncurses/panel/Makefile +++ b/lib/ncurses/panel/Makefile @@ -16,8 +16,13 @@ SRCS= ncurses_def.h \ INCS= ${NCURSES}/panel/panel.h CLEANFILES+= ncurses_def.h -CFLAGS+= -I. -I${.CURDIR}/../libncurses -I${NCURSES}/panel -I${NCURSES}/include \ - -Wall -DNDEBUG -DHAVE_CONFIG_H +CFLAGS+= -I. +.if exists(${.OBJDIR}/../libncurses) +CFLAGS+= -I${.OBJDIR}/../libncurses +.endif +CFLAGS+= -I${.CURDIR}/../libncurses +CFLAGS+= -I${NCURSES}/panel -I${NCURSES}/include -I${NCURSES}/ncurses \ + -Wall -DNDEBUG -DHAVE_CONFIG_H ncurses_def.h: MKncurses_def.sh ncurses_defs AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \