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.
This commit is contained in:
parent
a3f809008c
commit
b5f8a9a4d5
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue