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