File: Makefile

package info (click to toggle)
tinyirc 1%3A1.1-4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 272 kB
  • ctags: 156
  • sloc: ansic: 1,299; makefile: 67
file content (58 lines) | stat: -rw-r--r-- 1,429 bytes parent folder | download | duplicates (2)
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
# tinyirc makefile
# by Nathan Laredo
#
# I don't wish to assert any rights (copyright) over this makefile
# but please give me credit if you use my code.
#
SERVER = irc.debian.org
PORT = 6667
#
all:
	## Please use "make target"
	## where target is one of the following
	##
	## aix    hpux    gnu    posix    generic    debug
	##
	## If you have trouble with the input line, try a different target

debug:
	$(MAKE) tinyirc CFLAGS=-g LDFLAGS=-g CC=gcc LIBS=-ltermcap

generic:
	$(MAKE) tinyirc CFLAGS=-O LDFLAGS=-s LIBS=-ltermcap

aix:
	$(MAKE) tinyirccv CFLAGS="-O -D_AIX_" \
		LDFLAGS=-s LIBS=-lcurses CC=bsdcc

posix:
	$(MAKE) tinyirc CFLAGS="-O2 -DPOSIX -DDO_CTCP" LDFLAGS="-s" LIBS=-lncurses

gnu:
	$(MAKE) tinyirc CFLAGS="-O2 -pipe -DPOSIX -Wall -Wunused -Wformat" \
		LDFLAGS=-s LIBS=-ltermcap CC=gcc

hpux:
	$(MAKE) tinyirccv LDFLAGS=-s LIBS=-lcurses

ntest:
	$(MAKE) tinyirccv CFLAGS="-O -I/usr/include/ncurses -DPOSIX" \
		LDFLAGS="-L/usr/local/lib" LIBS=-lncurses CC=gcc

ctest:
	$(MAKE) tinyirccv CFLAGS=-O LDFLAGS=-s LIBS=-lcurses

DEFINES = -DDEFAULTSERVER=\"$(SERVER)\" -DDEFAULTPORT=$(PORT)

tinyirc: tinyirc.o
	$(CC) $(LDFLAGS) -o tinyirc tinyirc.o $(LIBS)

tinyirccv: tinyirccv.o
	$(CC) $(LDFLAGS) -o tinyirc tinyirccv.o $(LIBS)

tinyirc.o: tinyirc.c Makefile
	$(CC) $(CFLAGS) $(DEFINES) -c tinyirc.c -o tinyirc.o

tinyirccv.o: tinyirccv.c Makefile
	$(CC) $(CFLAGS) $(DEFINES) -c tinyirccv.c -o tinyirccv.o
#EOF