diff --git a/usr.sbin/cron/cron/Makefile b/usr.sbin/cron/cron/Makefile index bf9cf0e6edfc..09cde801485c 100644 --- a/usr.sbin/cron/cron/Makefile +++ b/usr.sbin/cron/cron/Makefile @@ -5,10 +5,14 @@ SRCS= cron.c database.c do_command.c job.c user.c popen.c MAN3= bitstring.3 MAN8= cron.8 -.if exists({.CURDIR}/../lib/obj) -LDADD+= -L${.CURDIR}/../lib/obj -lcron +.if exists(${.CURDIR}/../lib/obj) +LDDESTDIR+= -L${.CURDIR}/../lib/obj +DPADD+= ${.CURDIR}/../lib/obj/libcron.a .else -LDADD+= -L${.CURDIR}/../lib -lcron +LDDESTDIR+= -L${.CURDIR}/../lib +DPADD+= ${.CURDIR}/../lib/libcron.a .endif +LDADD+= -lcron + .include diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile index e3fe3e541d32..f8337b259049 100644 --- a/usr.sbin/cron/crontab/Makefile +++ b/usr.sbin/cron/crontab/Makefile @@ -7,9 +7,13 @@ MAN1= crontab.1 MAN5= crontab.5 .if exists(${.CURDIR}/../lib/obj) -LDADD+= -L${.CURDIR}/../lib/obj -lcron +LDDESTDIR+= -L${.CURDIR}/../lib/obj +DPADD+= ${.CURDIR}/../lib/obj/libcron.a .else -LDADD+= -L${.CURDIR}/../lib -lcron +LDDESTDIR+= -L${.CURDIR}/../lib +DPADD+= ${.CURDIR}/../lib/libcron.a .endif +LDADD+= -lcron + .include