Makefile
author viric@llimona
Fri, 13 Apr 2007 20:52:28 +0200
changeset 127 c620eacd7630
parent 121 7a42c36de0d0
child 133 4306e96f5906
permissions -rw-r--r--
Fixed the versions in the code.

PREFIX?=/usr/local
GLIBCFLAGS=-D_XOPEN_SOURCE=500 -D__STRICT_ANSI__
CFLAGS=-pedantic -ansi -Wall -g -O0
OBJECTS=main.o \
	server.o \
	server_start.o \
	client.o \
	msgdump.o \
	jobs.o \
	execute.o \
	msg.o \
	client_run.o \
	mail.o \
	error.o \
	signals.o \
	list.o
INSTALL=/usr/bin/install -c

all: ts

ts: $(OBJECTS)
	$(CC) $(LDFLAGS) -o ts $^

.c.o:
	$(CC) $(CFLAGS) $(GLIBCFLAGS) -c $<

# Dependencies
main.o: main.c main.h
server_start.o: server_start.c main.h
server.o: server.c main.h
client.o: client.c main.h
msgdump.o: msgdump.c main.h
jobs.o: jobs.c main.h
execute.o: execute.c main.h
msg.o: msg.c main.h
client_run.o: client_run.c main.h
mail.o: mail.c main.h
error.o: error.c main.h
signals.o: signals.c main.h
list.o: list.c main.h

clean:
	rm -f *.o ts

install: ts
	$(INSTALL) -d $(PREFIX)/bin
	$(INSTALL) ts $(PREFIX)/bin
	$(INSTALL) -d $(PREFIX)/man/man1
	$(INSTALL) -m 644 ts.1 $(PREFIX)/man/man1