1994-11-04 16:29:24 +00:00
|
|
|
#
|
|
|
|
# Examples makefile for Objective-C Class Library
|
1995-05-19 15:56:45 +00:00
|
|
|
# Copyright (C) 1993, 1995 Free Software Foundation, Inc.
|
1994-11-04 16:29:24 +00:00
|
|
|
#
|
|
|
|
# Written by: R. Andrew McCallum <mccallum@cs.rochester.edu>
|
|
|
|
# Dept. of Computer Science, U. of Rochester, Rochester, NY 14627
|
|
|
|
#
|
|
|
|
# This file is part of the GNU Objective-C Class Library.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Library General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Library General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Library General Public
|
|
|
|
# License along with this library; if not, write to the Free
|
|
|
|
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
|
|
#### Start of system configuration section. ####
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
|
|
|
|
CFLAGS = -Wall -Wno-implicit -g -O
|
|
|
|
CPPFLAGS =
|
|
|
|
LDFLAGS =
|
|
|
|
|
|
|
|
DEFS = @DEFS@
|
1995-06-30 20:29:22 +00:00
|
|
|
LIBS = -L$(srcdir)/../src -lobjects @LIBOBJC@ @LIBS@
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
#### End of system configuration section. ####
|
|
|
|
|
1995-06-20 16:32:10 +00:00
|
|
|
include $(srcdir)/../Makeconf
|
|
|
|
|
1995-06-30 20:29:22 +00:00
|
|
|
# xxx Is this needed anymore?
|
1994-11-04 16:29:24 +00:00
|
|
|
NEXT_NEXT_INCLUDES = -I/usr/include
|
|
|
|
OBJECTS_NEXT_INCLUDES = -I$(srcdir)/../objects/next-include
|
|
|
|
NEXT_INCLUDES = @NEXT_INCLUDES@
|
|
|
|
|
1995-06-30 20:29:22 +00:00
|
|
|
ALL_CPPFLAGS = -I$(srcdir)/../src $(NEXT_INCLUDES) $(CPPFLAGS)
|
1994-11-04 16:29:24 +00:00
|
|
|
ALL_CFLAGS = $(CFLAGS)
|
|
|
|
ALL_OBJCFLAGS = $(CFLAGS) -Wno-protocol
|
|
|
|
ALL_LDFLAGS = $(LDFLAGS) $(LIBS)
|
|
|
|
|
|
|
|
.SUFFIXES: .m
|
|
|
|
.m.o:
|
|
|
|
$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) $< -o $*.o
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_CFLAGS) $< -o $*.o
|
|
|
|
|
|
|
|
SRCS = \
|
|
|
|
dictionary.m \
|
|
|
|
stdio-stream.m \
|
|
|
|
textcoding.m \
|
|
|
|
port-server.m \
|
|
|
|
port-client.m \
|
|
|
|
first-server.m \
|
|
|
|
first-client.m \
|
|
|
|
second-server.m \
|
|
|
|
second-client.m
|
|
|
|
|
|
|
|
HDRS = \
|
|
|
|
first-server.h \
|
|
|
|
second-server.h \
|
|
|
|
second-client.h
|
|
|
|
|
|
|
|
EXCS = $(SRCS:.m=)
|
|
|
|
|
|
|
|
all: $(EXCS)
|
|
|
|
|
|
|
|
# This works for GNU make, but not others.
|
1995-11-14 16:39:40 +00:00
|
|
|
# %: %.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
# $(CC) $(ALL_CFLAGS) $< -o $@ $(ALL_LDFLAGS)
|
|
|
|
# How can I do this in a better way than the ugliness below?
|
|
|
|
# (but also have it work on old-style /bin/make)
|
|
|
|
|
|
|
|
LINK_CMD = $(CC) $(ALL_CFLAGS) $@.o -o $@ $(ALL_LDFLAGS)
|
1995-11-14 16:39:40 +00:00
|
|
|
dictionary: dictionary.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
$(LINK_CMD)
|
1995-11-14 16:39:40 +00:00
|
|
|
stdio-stream: stdio-stream.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
$(LINK_CMD)
|
1995-11-14 16:39:40 +00:00
|
|
|
textcoding: textcoding.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
$(LINK_CMD)
|
1995-11-14 16:39:40 +00:00
|
|
|
port-server: port-server.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
$(LINK_CMD)
|
1995-11-14 16:39:40 +00:00
|
|
|
port-client: port-client.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
$(LINK_CMD)
|
1995-11-14 16:39:40 +00:00
|
|
|
first-server: first-server.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
$(LINK_CMD)
|
1995-11-14 16:39:40 +00:00
|
|
|
first-client: first-client.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
$(LINK_CMD)
|
1995-11-14 16:39:40 +00:00
|
|
|
second-server: second-server.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
$(LINK_CMD)
|
1995-11-14 16:39:40 +00:00
|
|
|
second-client: second-client.o $(srcdir)/../src/@LIBOBJECTS_A_OR_SO@
|
1994-11-04 16:29:24 +00:00
|
|
|
$(LINK_CMD)
|
|
|
|
|
|
|
|
first: first-server first-client
|
|
|
|
second: second-server second-client
|
|
|
|
port: port-server port-client
|
|
|
|
|
1995-06-20 16:32:10 +00:00
|
|
|
install:
|
|
|
|
uninstall:
|
|
|
|
|
1995-10-18 16:47:59 +00:00
|
|
|
RCS_FILES = $(SRCS) $(HDRS) Makefile.in \
|
|
|
|
Makefile.example.in \
|
|
|
|
configure.example.in
|
|
|
|
|
1995-06-20 16:32:10 +00:00
|
|
|
DIST_FILES = $(RCS_FILES)
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
mostlyclean:
|
|
|
|
rm -f core *~
|
|
|
|
|
|
|
|
clean: mostlyclean
|
|
|
|
rm -f *.o $(EXCS)
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f Makefile config.status
|
|
|
|
|
|
|
|
realclean: distclean
|
|
|
|
rm -f TAGS
|
|
|
|
|
1995-06-20 16:32:10 +00:00
|
|
|
copy-dist: $(DIST_FILES)
|
|
|
|
mkdir $(srcdir)/../snap/examples
|
|
|
|
ln $(DIST_FILES) $(srcdir)/../snap/examples
|
1994-11-04 16:29:24 +00:00
|
|
|
|
|
|
|
Makefile: Makefile.in
|
|
|
|
cd $(srcdir)/..; $(SHELL) config.status
|