]> git.saurik.com Git - wxWidgets.git/blame - src/makeprog.env.in
cleanup
[wxWidgets.git] / src / makeprog.env.in
CommitLineData
8e877c19
RR
1# Make environment for making samples on Unix
2
3a922bb4 3# The binary program extension, if any, including dots (e.g. '.exe')
80d895cd 4PROGRAM_EXT = @PROGRAM_EXT@
3a922bb4
RL
5BIN_PROGRAM = $(PROGRAM)$(PROGRAM_EXT)
6RES_PROGRAM_OBJ = @RESPROGRAMOBJ@
ef7f2189 7BUNDLE = $(BIN_PROGRAM).app/Contents
3a922bb4 8
f5be30b7
VZ
9# NB: see remark in Makefile.in as to why we don't use %.foo: %.bar rules
10.SUFFIXES: .o .c .cpp .cxx .rc _resources.o
11
12.c.o:
3a922bb4 13 $(CC) -c $(CFLAGS) $(APPEXTRADEFS) -o $@ $<
80d895cd 14
f5be30b7 15.cpp.o:
3a922bb4 16 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
2f51a9ec 17
f5be30b7 18.cxx.o:
3a922bb4 19 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
48b1d0ff 20
dd5cad7a 21.rc_resources.o:
3a922bb4 22 $(RESCOMP) -i $< -o $@ $(RESFLAGS)
48b1d0ff 23
48b1d0ff 24
4e9fd9e2
SN
25# the comment at the end of the next line is needed because otherwise autoconf
26# would remove this line completely - it contains a built-in hack to remove
27# any VPATH assignment not containing ':'
3a922bb4 28VPATH = @PATH_IFS@$(top_srcdir)/$(program_dir) # ':' for autoconf
b1683d38 29
549c6f67 30# Set defaults from configure
3a922bb4 31include $(top_builddir)/src/make.env
8e877c19 32
ef7f2189 33all: $(BIN_PROGRAM) @MACOSX_BUNDLE@ install_dirs install_data
8e877c19 34
3a922bb4 35$(BIN_PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(RES_PROGRAM_OBJ) @LIBWXMACRES@
10cc14fa 36 $(CXX) $(LDFLAGS_EXE) -o $@ $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OBJ)
36825681
GD
37 @MACRESCOMP@ $(BIN_PROGRAM) $(RESOPTIONS)
38 @MACSETFILE@ $(SETOPTIONS) $(BIN_PROGRAM)
32832908 39
b1683d38 40install_dirs:
3a922bb4
RL
41 @list='$(DATADIRS)'; for p in $$list; do \
42 mkdir -p $(top_builddir)/$(program_dir)/$$p; \
b1683d38 43 done
ef7f2189 44
b1683d38 45install_data:
3a922bb4
RL
46 @list='$(DATAFILES)'; for p in $$list; do \
47 if test ! -s $(top_builddir)/$(program_dir)/$$p; then \
48 cp -pRf $(top_srcdir)/$(program_dir)/$$p $(top_builddir)/$(program_dir)/$$p; \
b1683d38
RR
49 fi; \
50 done
51
8e877c19 52clean:
afb74fdd 53 rm -f $(OBJECTS) $(DEPFILES) $(BIN_PROGRAM) $(RES_PROGRAM_OBJ) core
3a922bb4 54
ef7f2189
GD
55#
56# Targets to build a Mac OS X application bundle
57#
c9203501 58bundle: $(BUNDLE)/MacOS/$(PROGRAM) $(BUNDLE)/Info.plist $(BUNDLE)/PkgInfo $(BUNDLE)/Resources/$(PROGRAM).rsrc $(BUNDLE)/Resources/wxmac.icns
ef7f2189 59
c0187f69 60$(BUNDLE)/Info.plist: $(top_srcdir)/src/$(TOOLKITDIR)/Info.plist.in $(top_builddir)/lib/@WX_TARGET_LIBRARY@
ef7f2189 61 @$(INSTALL) -d `dirname $@`
6a1c4604 62 sed -e "s/IDENTIFIER/`echo $(program_dir) | sed 's,/,.,g'`/" \
ef7f2189
GD
63 -e "s/EXECUTABLE/$(PROGRAM)/" \
64 -e "s/VERSION/$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER)/" $< > $@
65
66$(BUNDLE)/PkgInfo:
67 @$(INSTALL) -d `dirname $@`
68 echo -n "APPL????" > $@
69
10cc14fa 70$(BUNDLE)/MacOS/$(PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@
ef7f2189 71 @$(INSTALL) -d `dirname $@`
10cc14fa 72 $(CXX) $(LDFLAGS_EXE) -o $@ $(OBJECTS) $(LDLIBS) $(LIBRARIES)
ef7f2189 73
10cc14fa 74$(BUNDLE)/Resources/$(PROGRAM).rsrc: $(top_builddir)/lib/@WX_RESOURCES_MACOSX_DATA@
c0187f69
GD
75 @$(INSTALL) -d `dirname $@`
76 cp $< $@
ef7f2189 77
c9203501 78$(BUNDLE)/Resources/wxmac.icns: $(top_srcdir)/src/$(TOOLKITDIR)/wxmac.icns
ef7f2189
GD
79 @$(INSTALL) -d `dirname $@`
80 cp $< $@