2015-06-14 22:04:34 +00:00
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -O2 -Wall
|
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.
2015-06-14 22:04:37 +00:00
|
|
|
PREFIX = /usr/local
|
|
|
|
BINDIR = $(PREFIX)/bin
|
|
|
|
MANDIR = $(PREFIX)/share/man/man1
|
|
|
|
INSTALL = install
|
2015-06-14 22:04:34 +00:00
|
|
|
|
|
|
|
# If you need to compile on a Linux, dont change anything. If
|
|
|
|
# compiling for Solaris, swap the LIBS below...
|
|
|
|
#
|
|
|
|
# For Linux (and other?) Machines...
|
|
|
|
#
|
2015-08-15 22:22:59 +00:00
|
|
|
LIBS = -lXpm -lX11 -lXext -lm -ldockapp
|
2015-06-14 22:04:34 +00:00
|
|
|
#
|
|
|
|
# For Sun Solaris Machines (I know it compiles on 2.6)...
|
|
|
|
#
|
|
|
|
# LIBS = -lXpm -lX11 -lXext -lsocket
|
|
|
|
|
2015-08-15 22:22:59 +00:00
|
|
|
OBJS = wmsun.o SunRise.o
|
2015-06-14 22:04:34 +00:00
|
|
|
|
|
|
|
.c.o:
|
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.
2015-06-14 22:04:37 +00:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
|
2015-06-14 22:04:34 +00:00
|
|
|
|
2015-06-14 22:04:49 +00:00
|
|
|
all: wmsun.o wmsun
|
2015-06-14 22:04:34 +00:00
|
|
|
|
2015-06-14 22:04:49 +00:00
|
|
|
wmsun.o: wmSun_master.xpm wmSun_mask.xbm
|
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.
2015-06-14 22:04:37 +00:00
|
|
|
|
2015-06-14 22:04:49 +00:00
|
|
|
wmsun: $(OBJS)
|
|
|
|
$(CC) $(LDFLAGS) -o wmsun $^ $(LIBS)
|
2015-06-14 22:04:34 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
for i in $(OBJS) ; do \
|
|
|
|
rm -f $$i; \
|
|
|
|
done
|
2015-06-14 22:04:49 +00:00
|
|
|
rm -f wmsun
|
2015-06-14 22:04:34 +00:00
|
|
|
|
2015-06-14 22:04:49 +00:00
|
|
|
install:: wmsun
|
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.
2015-06-14 22:04:37 +00:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(BINDIR)
|
2015-06-14 22:04:49 +00:00
|
|
|
$(INSTALL) wmsun $(DESTDIR)$(BINDIR)
|
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.
2015-06-14 22:04:37 +00:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(MANDIR)
|
2015-06-14 22:04:49 +00:00
|
|
|
$(INSTALL) -m 644 wmsun.1 $(DESTDIR)$(MANDIR)
|