# # The contents of this file are subject to the Netscape Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/NPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is Netscape # Communications Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): # DEPTH= ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk include $(srcdir)/objs.mk MODULE = ical LIBRARY_NAME=mozical ifeq ($(OS_ARCH),WINNT) MAPFILE = $(LIBRARY_NAME).map DEFFILE = $(srcdir)/ical.def endif CSRCS = $(ICAL_SRC_LCSRCS) ifeq (,$(filter -DHAVE_SNPRINTF=1,$(ACDEFINES))) CSRCS += vsnprintf.c endif EXPORTS = $(ICAL_SRC_LEXPORTS) FORCE_STATIC_LIB=1 GARBAGE += ical.h $(BUILT_COMBINEDHEADERS) $(BUILT_SOURCES) ifeq ($(OS_ARCH),WINNT) GARBAGE += $(LIBRARY_NAME).ilk endif LOCAL_INCLUDES = -I. -I$(srcdir) DESIGNDATA = $(srcdir)/../../design-data ICALSCRIPTS = $(srcdir)/../../scripts #//------------------------------------------------------------------------ #// #// Generate files that are automatically generated (*.h.in and *.c.in) #// #//------------------------------------------------------------------------ # ORDERING OF HEADERS IS SIGNIFICANT. Don't change this ordering. It # is required to make the combined header ical.h properly COMBINEDHEADERS = \ ../../config.h \ icalversion.h \ icaltime.h \ icalduration.h \ icalperiod.h \ icalenums.h \ icaltypes.h \ icalrecur.h \ icalderivedvalue.h \ icalderivedparameter.h \ icalvalue.h \ icalparameter.h \ icalderivedproperty.h \ icalproperty.h \ icalattendee.h \ pvl.h \ icalarray.h \ icalcomponent.h \ icaltimezone.h \ icalparser.h \ icalmemory.h \ icalerror.h \ icalrestriction.h \ sspm.h \ icalmime.h \ icallangbind.h BUILT_COMBINEDHEADERS = \ icalderivedparameter.h \ icalderivedproperty.h \ icalderivedvalue.h BUILT_SOURCES = \ $(BUILT_COMBINEDHEADERS)\ icalderivedparameter.c \ icalderivedproperty.c \ icalrestriction.c \ icalderivedvalue.c #//------------------------------------------------------------------------ #// #// Include the common makefile rules #// #//------------------------------------------------------------------------ SRCS_IN_OBJDIR = 1 include $(topsrcdir)/config/rules.mk exports:: $(BUILT_SOURCES) ical.h: $(COMBINEDHEADERS) Makefile cat $(filter-out Makefile,$^) \ | egrep -v "#include.*ical" \ | egrep -v "#include.*config" \ | egrep -v "#include.*pvl.h" > ical.h # parameters PARAMETERDEPS = \ $(ICALSCRIPTS)/mkderivedparameters.pl \ $(DESIGNDATA)/parameters.csv \ $(srcdir)/icalderivedparameter.c.in \ $(srcdir)/icalderivedparameter.h.in icalderivedparameter.h: $(PARAMETERDEPS) Makefile $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.h.in -h $(DESIGNDATA)/parameters.csv > icalderivedparameter.h icalderivedparameter.c: $(PARAMETERDEPS) $(BUILT_COMBINEDHEADERS) Makefile $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.c.in -c $(DESIGNDATA)/parameters.csv > icalderivedparameter.c # values VALUEDEPS = \ $(ICALSCRIPTS)/mkderivedvalues.pl \ $(DESIGNDATA)/value-types.csv \ $(srcdir)/icalderivedvalue.c.in \ $(srcdir)/icalderivedvalue.h.in icalderivedvalue.h: $(VALUEDEPS) Makefile $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \ -i $(srcdir)/icalderivedvalue.h.in -h $(DESIGNDATA)/value-types.csv > icalderivedvalue.h icalderivedvalue.c: $(VALUEDEPS) $(BUILT_COMBINEDHEADERS) Makefile $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \ -i $(srcdir)/icalderivedvalue.c.in -c $(DESIGNDATA)/value-types.csv > icalderivedvalue.c # properties PROPERTYDEPS = \ $(ICALSCRIPTS)/mkderivedproperties.pl \ $(DESIGNDATA)/properties.csv \ $(DESIGNDATA)/value-types.csv \ $(srcdir)/icalderivedproperty.c.in \ $(srcdir)/icalderivedproperty.h.in icalderivedproperty.h: $(PROPERTYDEPS) Makefile $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \ -i $(srcdir)/icalderivedproperty.h.in -h $(DESIGNDATA)/properties.csv \ $(DESIGNDATA)/value-types.csv > icalderivedproperty.h icalderivedproperty.c: $(PROPERTYDEPS) $(BUILT_COMBINEDHEADERS) Makefile $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \ -i $(srcdir)/icalderivedproperty.c.in -c $(DESIGNDATA)/properties.csv \ $(DESIGNDATA)/value-types.csv > icalderivedproperty.c # restrictions RESTRICTIONDEPS = \ $(ICALSCRIPTS)/mkrestrictiontable.pl \ $(DESIGNDATA)/restrictions.csv \ $(srcdir)/icalrestriction.c.in icalrestriction.c: $(RESTRICTIONDEPS) Makefile $(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i $(srcdir)/icalrestriction.c.in \ $(DESIGNDATA)/restrictions.csv > icalrestriction.c ifneq (,$(filter BeOS Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH))) DEFINES += -D__USE_BSD=1 endif