1999-08-10 16:08:24 -04:00
|
|
|
# Make environment for making samples on Unix
|
|
|
|
|
2001-09-28 03:00:13 -04:00
|
|
|
# The binary program extension, if any, including dots (e.g. '.exe')
|
1999-08-22 18:43:58 -04:00
|
|
|
PROGRAM_EXT = @PROGRAM_EXT@
|
2001-09-28 03:00:13 -04:00
|
|
|
BIN_PROGRAM = $(PROGRAM)$(PROGRAM_EXT)
|
|
|
|
RES_PROGRAM_OBJ = @RESPROGRAMOBJ@
|
2002-02-24 13:02:51 -05:00
|
|
|
BUNDLE = $(BIN_PROGRAM).app/Contents
|
2001-09-28 03:00:13 -04:00
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) -c $(CFLAGS) $(APPEXTRADEFS) -o $@ $<
|
1999-08-22 18:43:58 -04:00
|
|
|
|
2001-09-28 03:00:13 -04:00
|
|
|
%.o : %.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
|
2001-05-01 15:40:09 -04:00
|
|
|
|
2001-09-28 03:00:13 -04:00
|
|
|
%.o : %.cxx
|
|
|
|
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
|
1999-08-11 13:40:09 -04:00
|
|
|
|
2001-09-28 03:00:13 -04:00
|
|
|
%_resources.o : %.rc
|
|
|
|
$(RESCOMP) -i $< -o $@ $(RESFLAGS)
|
1999-08-11 13:40:09 -04:00
|
|
|
|
|
|
|
|
2000-01-14 17:24:27 -05:00
|
|
|
# the comment at the end of the next line is needed because otherwise autoconf
|
|
|
|
# would remove this line completely - it contains a built-in hack to remove
|
|
|
|
# any VPATH assignment not containing ':'
|
2001-09-28 03:00:13 -04:00
|
|
|
VPATH = @PATH_IFS@$(top_srcdir)/$(program_dir) # ':' for autoconf
|
1999-08-14 07:14:39 -04:00
|
|
|
|
1999-08-14 05:41:49 -04:00
|
|
|
# Set defaults from configure
|
2001-09-28 03:00:13 -04:00
|
|
|
include $(top_builddir)/src/make.env
|
1999-08-10 16:08:24 -04:00
|
|
|
|
2002-02-24 13:02:51 -05:00
|
|
|
all: $(BIN_PROGRAM) @MACOSX_BUNDLE@ install_dirs install_data
|
1999-08-10 16:08:24 -04:00
|
|
|
|
2001-09-28 03:00:13 -04:00
|
|
|
$(BIN_PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(RES_PROGRAM_OBJ) @LIBWXMACRES@
|
|
|
|
$(CXX) $(LDFLAGS) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OBJ)
|
2001-05-01 15:40:09 -04:00
|
|
|
@LIBWXMACRESCOMP@
|
2000-03-09 15:18:59 -05:00
|
|
|
|
1999-08-14 07:14:39 -04:00
|
|
|
install_dirs:
|
2001-09-28 03:00:13 -04:00
|
|
|
@list='$(DATADIRS)'; for p in $$list; do \
|
|
|
|
mkdir -p $(top_builddir)/$(program_dir)/$$p; \
|
1999-08-14 07:14:39 -04:00
|
|
|
done
|
2002-02-24 13:02:51 -05:00
|
|
|
|
1999-08-14 07:14:39 -04:00
|
|
|
install_data:
|
2001-09-28 03:00:13 -04:00
|
|
|
@list='$(DATAFILES)'; for p in $$list; do \
|
|
|
|
if test ! -s $(top_builddir)/$(program_dir)/$$p; then \
|
|
|
|
cp -pRf $(top_srcdir)/$(program_dir)/$$p $(top_builddir)/$(program_dir)/$$p; \
|
1999-08-14 07:14:39 -04:00
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
1999-08-10 16:08:24 -04:00
|
|
|
clean:
|
2001-09-28 10:25:09 -04:00
|
|
|
rm -f $(OBJECTS) $(DEPFILES) $(BIN_PROGRAM) $(RES_PROGRAM_OBJ) core
|
2001-09-28 03:00:13 -04:00
|
|
|
|
2002-02-24 13:02:51 -05:00
|
|
|
#
|
|
|
|
# Targets to build a Mac OS X application bundle
|
|
|
|
#
|
|
|
|
bundle: $(BUNDLE)/Info.plist $(BUNDLE)/PkgInfo $(BUNDLE)/MacOS/$(PROGRAM) $(BUNDLE)/Resources/$(PROGRAM).rsrc $(BUNDLE)/Resources/$(PROGRAM).icns
|
|
|
|
|
2002-03-06 17:06:27 -05:00
|
|
|
$(BUNDLE)/Info.plist: $(top_srcdir)/src/$(TOOLKITDIR)/Info.plist.in $(BIN_PROGRAM)
|
2002-02-24 13:02:51 -05:00
|
|
|
@$(INSTALL) -d `dirname $@`
|
2002-03-06 17:06:27 -05:00
|
|
|
sed -e "s/IDENTIFIER/`echo $(program_dir) | sed 's,/,.,g'`/" \
|
2002-02-24 13:02:51 -05:00
|
|
|
-e "s/EXECUTABLE/$(PROGRAM)/" \
|
|
|
|
-e "s/VERSION/$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER)/" $< > $@
|
|
|
|
|
|
|
|
$(BUNDLE)/PkgInfo:
|
|
|
|
@$(INSTALL) -d `dirname $@`
|
|
|
|
echo -n "APPL????" > $@
|
|
|
|
|
|
|
|
$(BUNDLE)/MacOS/$(PROGRAM): $(BIN_PROGRAM)
|
|
|
|
@$(INSTALL) -d `dirname $@`
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(BUNDLE)/Resources/$(PROGRAM).rsrc: $(top_builddir)/lib/@WX_RESOURCES_MACOSX@
|
|
|
|
@$(INSTALL) -d `dirname $@`
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(BUNDLE)/Resources/$(PROGRAM).icns: $(top_srcdir)/src/$(TOOLKITDIR)/wxmac.icns
|
|
|
|
@$(INSTALL) -d `dirname $@`
|
|
|
|
cp $< $@
|