#
# Makefile for the "RecipeFilter" program
# .daemon suffix will prevent Workspace from displaying the app icon or passing
# -NXServiceLaunch YES -MachLaunch <reply id> <window number>

NAME = RecipeFilter
MFILES = RecipeFilter.m
OFILES = RecipeFilter.o
LIBS = -lIndexing_s -lNeXT_s -lsys_s
CFLAGS = -O -Wall $(RC_CFLAGS)
LDFLAGS = $(RC_CFLAGS)

# CFLAGS = -g -Wimplicit
# Need to put section __services in segment __ICON for spec for services
# LDFLAGS = -segcreate __ICON __header $(NAME).iconheader \
# -segcreate __ICON app defaultDaemonIcon.tiff \
# -segcreate __ICON __services $(NAME).services

$(NAME): $(OFILES)
	/bin/rm -rf ./RecipeIndexing.service
	mkdir ./RecipeIndexing.service
	$(CC) $(CFLAGS) -s $(LDFLAGS) -o ./RecipeIndexing.service/$(NAME).daemon $(OFILES) $(LIBS)
	/bin/cp services ./RecipeIndexing.service


$(NAME).o: $(NAME).m
	/bin/rm -f $(OFILES)
	$(CC) $(CFLAGS) -c $(NAME).m

clean:
	/bin/rm -rf ./RecipeIndexing.service
	/bin/rm -f $(OFILES)
