DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL.  You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
# Reserved.

DEPTH		= ../../..
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@

include $(DEPTH)/config/autoconf.mk

include $(topsrcdir)/config/config.mk
include $(topsrcdir)/cmd/unixfe/config/unixfe.mk

MODULE		= xfeicons
LIBRARY_NAME	= xfeicons

EXPORTS		= $(srcdir)/icondata.h

REQUIRES	= img java jtools layer nspr util xp xpcom \
		  $(XFE_JPEG_REQUIRES) $(XFE_PNG_REQUIRES) $(XFE_ZLIB_REQUIRES)

LOCAL_INCLUDES	= -I$(srcdir)/. -I$(OBJDIR)

ICONS_GEN_HDR	= $(OBJDIR)/icon_extern.h
ICONS_GEN_SRC	= $(OBJDIR)/icondata.c

ICONLIST	= $(OBJDIR)/icon.list
ICONANIMLIST	= $(OBJDIR)/iconanim.list
MKICONS_EXE	= $(OBJDIR)/mkicons

GARBAGE		+= $(MKICONS_EXE) \
		 $(ICONS_GEN_HDR) \
		 $(ICONS_GEN_HDR).tmp \
		 $(ICONS_GEN_SRC) \
		 $(ICONLIST) \
		 $(ICONANIMLIST)

include $(topsrcdir)/config/rules.mk

OBJS		= $(ICONS_GEN_SRC:.c=.o)

# See comment in icondata.c for why this is necessary.
DEFINES		+= -DXFE

# Split the icons by portion of the product.
# Be careful to avoid hitting max line length on Irix,
# therefore, split the icon list among several variables.
ICONS		= $(wildcard $(srcdir)/images/[AGIHL]*.gif $(srcdir)/images/BM*.gif $(srcdir)/images/DTB*.gif)
ICONS		+= $(wildcard $(srcdir)/images/Dash*.gif $(srcdir)/images/TB*.gif)
ICONS		+= $(addprefix $(srcdir)/, \
		   images/Desk_AdminKit.gif \
		   images/Desk_Bookmark.gif \
		   images/Desk_Calendar.gif \
		   images/Desk_Communicator.gif \
		   images/Desk_Conference.gif \
		   images/Desk_History.gif \
		   images/Desk_Navigator.gif \
		   images/Desk_Search.gif \
		   images/SEC_Replace.gif \
		   images/Splash.gif \
		   images/cparent.gif )

# Icons for the Outliner
ICONS		+= $(wildcard $(srcdir)/images/hidecolumn*.gif $(srcdir)/images/showcolumn*.gif) \
		   $(srcdir)/images/oparent.gif

# Icons referenced in rosetta.h
ICONS		+= $(wildcard $(srcdir)/images/M_*.gif)

MAIL_OR_COMPOSE_ICONS	= $(wildcard $(srcdir)/images/MNC*.gif $(srcdir)/images/MNTB_Next*.gif \
			    $(srcdir)/images/MNTB_Forward*.gif $(srcdir)/images/MNAB_NewPerson*.gif \
			    $(srcdir)/images/MN_Draft*.gif $(srcdir)/images/MN_Collect*.gif \
			    $(srcdir)/images/MN_Template*.gif) \
			  $(addprefix $(srcdir)/, \
			  images/MN_MailAttach.gif \
			  images/MN_Person.gif \
			  images/MN_People.gif )

ifdef MOZ_MAIL_NEWS
ICONS		+= $(MAIL_OR_COMPOSE_ICONS) \
		   $(wildcard $(srcdir)/images/MNTB*.gif $(srcdir)/images/MNAB*.gif $(srcdir)/images/MN_*.gif) \
		   $(addprefix $(srcdir)/, \
		   images/threadoff.gif \
		   images/threadon.gif \
		   images/Desk_Address.gif \
		   images/Desk_Collabra.gif \
		   images/Desk_Messenger.gif \
		   images/Desk_MsgCenter.gif \
		   images/Desk_NewMail.gif )
endif

ifdef MOZ_MAIL_COMPOSE
ifndef MOZ_MAIL_NEWS
ICONS		+= $(MAIL_OR_COMPOSE_ICONS)
endif
ICONS		+= $(srcdir)/images/Desk_MsgCompose.gif
endif

ifdef MOZ_EDITOR
ICONS		+= $(wildcard $(srcdir)/images/e*.gif $(srcdir)/images/Desk_Composer.gif)
endif

ifdef MOZ_TASKBAR
ICONS		+= $(wildcard $(srcdir)/images/Task*.gif)
endif

ifdef MOZ_NETCAST
ICONS		+= $(srcdir)/images/Desk_Netcaster.gif
endif

ifdef NETSCAPE_COMMERCIAL
ANIM		= $(wildcard $(XFEPRIVDIR)/icons/anim/main/*.gif)
else
ANIM		= $(wildcard $(srcdir)/anim/main/*.gif)
endif

ifdef JAVA_OR_NSJVM
JAVA_JMC	= $(DIST)/lib/libjmc.a        # XXX To be removed...
else
JAVA_JMC	= $(DIST)/lib/libstubsj.a
endif

MKICONS_LIB	= \
		  $(DIST)/lib/libimg.a \
		  $(JAVA_JMC) \
		  $(DIST)/lib/libutil.a \
		  $(DIST)/lib/libxp.a \
		  $(DIST)/lib/libxpcom.a \
		  $(XFE_MKICONS_PNG_LIB) \
		  $(XFE_MKICONS_ZLIB_LIB) \
		  $(XFE_MKICONS_JPEG_LIB) \
		  $(NULL)

MKICONS_DSOS	= \
		  $(XFE_MKICONS_JPEG_DSO) \
		  $(XFE_MKICONS_PNG_DSO) \
		  $(XFE_MKICONS_ZLIB_DSO) \
		  $(NULL)

GARBAGE		+= $(MKICONS_EXE) \
		  $(wildcard $(ICONS_GEN_HDR)*) \
		  $(wildcard $(ICONS_GEN_SRC)*) \
		  $(ICONLIST) \
		  $(ICONANIMLIST)

MKICONS_EXTRA	= $(MKICONS_DSOS) $(NSPR_LIBS) $(OS_LIBS) -lm

#######################################################################
# Rules to build mkicons program and then icondata.c

# XXX We need to reach into the Image Library modules's source directory to 
# get the file if.h
$(MKICONS_EXE): mkicons.cpp $(MKICONS_LIB)
	$(CCC) $(CFLAGS) -o $@ -I$(topsrcdir)/modules/libimg/src $< $(XFE_MKICONS_BIN_LDPATH) $(MKICONS_LIB) $(MKICONS_EXTRA)

$(ICONLIST): $(ICONS)
	@echo Adding icons to $@
	@$(MAKE_OBJDIR)
	@rm -f $@
	@ls $(ICONS) > $@

$(ICONANIMLIST): $(ICONLIST) $(ANIM)
	@echo Adding icons and animations to $(ICONANIMLIST)
	@rm -f $(ICONANIMLIST)
	@cat $(ICONLIST) > $(ICONANIMLIST)
ifneq ($(ANIM),)
	@ls $(ANIM) >> $(ICONANIMLIST)
endif

$(ICONS_GEN_HDR): $(ICONLIST)
	@rm -f $@.tmp
	@sed 's/.*\/images\/\(.*\)\.gif.*/extern struct fe_icon_data \1;/; y/./_/;' $(ICONLIST) > $@.tmp
	@if test ! -f $@; then touch $@; else true; fi
	@if test ! -z "`diff $@.tmp $@`"; then rm -f $@; mv $@.tmp $@; else true; fi

$(ICONS_GEN_SRC): icondata.h $(ICONANIMLIST) $(MKICONS_EXE) $(ICONS_GEN_HDR)
	@rm -f $@
	$(MKICONS_EXE) -no-xfe-define - < $(ICONANIMLIST) > $@

$(LIBRARY): $(OBJS)

export:: $(ICONS_GEN_HDR) $(DIST)/include
	$(INSTALL) -m 444 $^