File: Makefile

package info (click to toggle)
qstat 2.0b-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 228 kB
  • ctags: 286
  • sloc: ansic: 2,152; makefile: 87
file content (77 lines) | stat: -rw-r--r-- 1,817 bytes parent folder | download
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

CFLAGS =

# Uncomment if you have gcc
# CC = gcc

# NOTE: if you get errors when linking qstat (missing symbols or
# libraries), then switch the LIBS macro being used.

NO_LIBS =
SOLARIS_LIBS = -lsocket -lnsl
WINDOWS_LIBS = wsock32.lib
OS2_LIBS = so32dll.lib tcp32dll.lib

# Irix 5.3, Linux, FreeBSD, many other Unixes
LIBS = $(NO_LIBS)

# Solaris 2
# LIBS = $(SOLARIS_LIBS)

# Windows 95/NT
# LIBS = $(WINDOWS_LIBS)

# OS/2
# LIBS = $(OS2_LIBS)

# The first line is for Unix.  Switch the comment character for Windows.
# (there should be no need to compile on Windows, but in case you care ...)
all: qstat
#all: qstat.exe

qstat: qstat.c
	$(CC) $(CFLAGS) -o qstat qstat.c $(LIBS)

solaris: qstat.c
	$(CC) $(CFLAGS) -o qstat qstat.c $(SOLARIS_LIBS)

sgi freebsd irix linux: qstat.c
	$(CC) $(CFLAGS) -o qstat qstat.c $(NO_LIBS)

hp: qstat.c
	$(CC) $(CFLAGS) -Ae -o qstat qstat.c $(NO_LIBS)

windows: qstat.c
	$(CC) /ML /c qstat.c
	link qstat.obj /out:qstat.exe $(WINDOWS_LIBS)

os2: qstat.c
	$(CC) /Q /W0 /C+ qstat.c
	ilink /PM:VIO qstat.obj /out:qstat.exe $(OS2_LIBS)

clean:
	rm -f qstat core qstat.exe qstat.obj

VERSION = 20b
WVERSION = 20b
CP_FILES = Makefile qstat.txt qstatdoc.html qstat.c qstat.h \
	CHANGES.txt COMPILE.txt win32 os2

tar: always
	rm -rf tar qstat$(VERSION)
	rm -f qstat$(VERSION).tar qstat$(VERSION).tar.Z qstat$(VERSION).tar.gz
	mkdir qstat$(VERSION)
	-cp -rp $(CP_FILES) qstat$(VERSION)
	tar cvf qstat$(VERSION).tar qstat$(VERSION)
	gzip qstat$(VERSION).tar

zip: always
	rm -rf zip qsta$(WVERSION) qstat$(WVERSION)
	rm -f qstat$(WVERSION).zip qstat$(WVERSION).zip
	mkdir qstat$(WVERSION)
	-cp -rp $(CP_FILES) qstat$(WVERSION)
	mv qstat$(WVERSION)/qstatdoc.html qstat$(WVERSION)/qstatdoc.htm
	cd qstat$(WVERSION) ; crtocrlf * ; cd ..
	zip -r qstat$(WVERSION).zip qstat$(WVERSION)

always: