3 # Copyright (C) 1995, 1996 Ovidiu Predescu and Mircea Oancea.
6 # Author: Mircea Oancea <mircea@jupiter.elcom.pub.ro>
8 # This file is part of libFoundation.
10 # Permission to use, copy, modify, and distribute this software and its
11 # documentation for any purpose and without fee is hereby granted, provided
12 # that the above copyright notice appear in all copies and that both that
13 # copyright notice and this permission notice appear in supporting
16 # We disclaim all warranties with regard to this software, including all
17 # implied warranties of merchantability and fitness, in no event shall
18 # we be liable for any special, indirect or consequential damages or any
19 # damages whatsoever resulting from loss of use, data or profits, whether in
20 # an action of contract, negligence or other tortious action, arising out of
21 # or in connection with the use or performance of this software.
26 include $(TOP)/config.mak
29 LIBS := -lFoundation $(LIBS)
31 .SUFFIXES: .m .h $(objext)
33 DEFAULTS = $(OBJDIR)/Defaults$(exeext)
35 all: $(OBJDIR) $(DEFAULTS) .gdbinit
37 DEFAULTSM = Defaults.m
39 DEFAULTSO = $(addprefix $(OBJDIR)/, $(DEFAULTSM:.m=$(objext)))
41 CFLAGS += -I../Foundation
43 $(DEFAULTS): $(DEFAULTSO)
44 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(DEFAULTSO) -L$(LIB) -L$(libdir) $(LIBS)
50 $(addprefix $(OBJDIR)/, %$(objext)) : %.m
51 $(CC) $(CFLAGS) $(DEBUGFLAGS) -c $< -o $(OBJDIR)/$(@F)
57 rm -rf $(OBJDIR) .gdbinit t
63 if test ! -d $(bindir); then mkdir $(bindir); fi
64 $(INSTALL_PROGRAM) $(DEFAULTS) $(bindir)/Defaults$(exeext)
67 rm $(exec_prefix)/$(DEFAULTS)
72 @echo shell $(MAKE) >>$@
74 @echo dir . $(TOP)/Foundation >>$@