[Pkg-wmaker-commits] [wmsun] 22/73: wmsun: Update Makefile.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Aug 28 12:04:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmsun.

commit a73d5169679f2a555f2606e39cc25e1e5cf3fab5
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sun Jun 14 17:04:37 2015 -0500

    wmsun: Update Makefile.
    
    In particular,
    - Remove INCDIR, DESTDIR, and LIBDIR definitions.
    - Add PREFIX, BINDIR, MANDIR, and INSTALL definitions.
    - Add -lm to LIBS.
    - Drop COPTS, uname, and INCDIR and add CPPFLAGS and CFLAGS when compiling.
    - Drop COPTS, SYSTEM, INCDIR, and LIBDIR and add LDFLAGS when linking.
    - Use INSTALL when installing, create installation directories, use new
      BINDIR and MANDIR directories.
---
 Makefile | 30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile
index a3709cf..81f0f67 100644
--- a/Makefile
+++ b/Makefile
@@ -1,35 +1,32 @@
 CC     = gcc
 CFLAGS = -O2 -Wall
-INCDIR = -I/usr/X11R6/include/X11
-DESTDIR= /usr/X11R6
-LIBDIR = -L/usr/X11R6/lib
-
-
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/share/man/man1
+INSTALL = install
 
 # If you need to compile on a Linux, dont change anything. If
 # compiling for Solaris, swap the LIBS below...
 #
 # For Linux (and other?) Machines...
 #
-LIBS   = -lXpm -lX11 -lXext
+LIBS   = -lXpm -lX11 -lXext -lm
 #
 # For Sun Solaris Machines (I know it compiles on 2.6)...
 #
 # LIBS   = -lXpm -lX11 -lXext -lsocket
 
-
 OBJS   = wmSun.o SunRise.o wmgeneral/wmgeneral.o
 
-
 .c.o:
-	$(CC) $(COPTS) -D$(shell echo `uname -s`) -c $< -o $*.o $(INCDIR)
-
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
 
 all:	wmSun.o wmSun
 
-wmSun.o: wmSun_master.xpm wmSun_mask.xbm 
-wmSun:	$(OBJS) 
-	$(CC) $(COPTS) $(SYSTEM) -lm -o wmSun $^ $(INCDIR) $(LIBDIR) $(LIBS)
+wmSun.o: wmSun_master.xpm wmSun_mask.xbm
+
+wmSun:	$(OBJS)
+	$(CC) $(LDFLAGS) -o wmSun $^ $(LIBS)
 
 clean:
 	for i in $(OBJS) ; do \
@@ -38,6 +35,7 @@ clean:
 	rm -f wmSun
 
 install:: wmSun
-	install -s -m 0755 wmSun $(DESTDIR)/bin
-	install    -m 0644 wmSun.1 $(DESTDIR)/man/man1 
-
+	$(INSTALL) -d $(DESTDIR)$(BINDIR)
+	$(INSTALL) wmSun $(DESTDIR)$(BINDIR)
+	$(INSTALL) -d $(DESTDIR)$(MANDIR)
+	$(INSTALL) -m 644 wmSun.1 $(DESTDIR)$(MANDIR)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmsun.git



More information about the Pkg-wmaker-commits mailing list