summaryrefslogtreecommitdiff
path: root/time/dclock/patches/patch-aa
blob: a4cb934c9c469a9016f7c1d77bc26e769ac45986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-aa,v 1.4 2009/07/07 20:27:10 joerg Exp $

--- Makefile.orig	2005-01-24 22:41:08.000000000 -0500
+++ Makefile
@@ -3,12 +3,27 @@ SRCS= Dclock.c dclock.c
 OBJS= Dclock.o dclock.o
 HFILES= Dclock.h DclockP.h patchlevel.h
 
-CFLAGS= -O
-LDFLAGS= 
+CFLAGS= -O -I$(X11BASE)/include
+LDFLAGS= -L$(X11BASE)/lib -Wl,-R$(X11BASE)/lib
 LIBS= -lXt -lX11
 
+# Make this link properly on Solaris
+OPSYS!= uname -s
+
+.if ${OPSYS} == "SunOS"
+LIBS+= -lSM -lICE -lsocket -lnsl
+.elif ${OPSYS} == "Interix"
+LIBS+= -lSM -lICE
+.endif
+
+all: dclock
+
 dclock: ${OBJS}
-	cc ${LDFLAGS} ${OBJS} ${LIBS} -o dclock
+	${LINK.c} -o dclock ${OBJS} ${LIBS}
+
+install: dclock
+	${BSD_INSTALL_PROGRAM} dclock ${DESTDIR}$(PREFIX)/bin
+	${BSD_INSTALL_MAN} dclock.man ${DESTDIR}$(PREFIX)/man/man1/dclock.1
 
 clean: ; rm -f ${OBJS} core dclock