]> git.saurik.com Git - wxWidgets.git/blob - src/makeprog.env.in
linking fixes
[wxWidgets.git] / src / makeprog.env.in
1 # Make environment for making samples on Unix
2
3 # Clears all default suffixes
4 .SUFFIXES: .o .cpp .c .cxx
5
6 # The binary program extension, if any, including dots (e.g. '.exe')
7 PROGRAM_EXT = @PROGRAM_EXT@
8 BIN_PROGRAM = $(PROGRAM)$(PROGRAM_EXT)
9 RES_PROGRAM = $(PROGRAM)_resources.o
10 RES_PROGRAM_OPT = @RESPROGRAM@
11
12 # To add resources to the Mac OS X applications
13 LIBWX_MACRES = $(top_builddir)/lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).r
14 LIBWX_MACRESCOMP = $(RESCOMP) $(RESFLAGS) $(LIBWX_MACRES) -o $(BIN_PROGRAM)
15
16 .c.o :
17 $(CCC) -c $(CFLAGS) $(APPEXTRADEFS) -o $@ $<
18
19 .cpp.o :
20 $(CC) -c $(CPPFLAGS) $(APPEXTRADEFS) -o $@ $<
21
22 .cxx.o :
23 $(CC) -c $(CPPFLAGS) $(APPEXTRADEFS) -o $@ $<
24
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 ':'
28 VPATH = @PATH_IFS@$(top_srcdir)/$(program_dir) # ':' for autoconf
29
30 # Set defaults from configure
31 include $(top_builddir)/src/make.env
32
33 all: $(BIN_PROGRAM) install_dirs install_data
34
35 $(BIN_PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(RES_PROGRAM_OPT) @LIBWXMACRES@
36 $(CC) $(LDFLAGS) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OPT)
37 @LIBWXMACRESCOMP@
38
39 $(RES_PROGRAM): $(PROGRAM).rc
40 $(RESCOMP) $(RCINPUTSWITCH) $(top_srcdir)/$(program_dir)/$(PROGRAM).rc $(RCOUTPUTSWITCH) $(PROGRAM)_resources.o $(RESFLAGS)
41
42 install_dirs:
43 @list='$(DATADIRS)'; for p in $$list; do \
44 mkdir -p $(top_builddir)/$(program_dir)/$$p; \
45 done
46
47 install_data:
48 @list='$(DATAFILES)'; for p in $$list; do \
49 if test ! -s $(top_builddir)/$(program_dir)/$$p; then \
50 cp -pRf $(top_srcdir)/$(program_dir)/$$p $(top_builddir)/$(program_dir)/$$p; \
51 fi; \
52 done
53
54 clean:
55 rm -f $(OBJECTS) $(BIN_PROGRAM) $(RES_PROGRAM) core