File: Makefile

package info (click to toggle)
wmtop 0.84-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 200 kB
  • ctags: 156
  • sloc: ansic: 1,202; makefile: 74
file content (46 lines) | stat: -rw-r--r-- 949 bytes parent folder | download | duplicates (4)
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
36
37
38
39
40
41
42
43
44
45
46
DEBUG  = -DPARANOID
LIBDIR = -L/usr/X11R6/lib
LIBS   = -lXpm -lXext -lX11
INCS   = -I/usr/X11R6/share/include -I/usr/X11R6/include
OBJS   = wmtop.o wmgeneral/wmgeneral.o wmgeneral/misc.o wmgeneral/list.o
OPTS   = -O3 -g -Wall
FLAGS  = $(DEBUG) $(OPTS) -D$(OS)
MAKE   = make
CC     = cc
PREFIX ?= /usr/local

default:
	@echo Use '"make os"' where '"os"' is one of:
	@echo "    freebsd"
	@echo "    linux"
	@echo Then '"make install"'

freebsd:
	$(MAKE) OS=FREEBSD all

linux:
	$(MAKE) OS=LINUX all

.c.o:
	$(CC) $(FLAGS) $(INCS) -c $< -o $*.o

wmtop: $(OBJS) wmtop.o
	$(CC) $(FLAGS) -o wmtop $(OBJS) $(LIBDIR) $(LIBS)
	@echo Now you can do a '"make install"'

all: wmtop

clean:
	for i in $(OBJS) ; do \
		rm -f $$i ; \
	done
	rm -f wmtop 
	rm -f *~

install: wmtop
	strip wmtop
	cp -f wmtop $(PREFIX)/bin/
	chmod 755 $(PREFIX)/bin/wmtop
	cp -f wmtop.1 $(PREFIX)/man/man1
	chmod 644 $(PREFIX)/man/man1/wmtop.1
	@echo "wmtop Installation finished..."