]>
Commit | Line | Data |
---|---|---|
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 | ||
10 | .c.o : | |
11 | $(CCC) -c $(CFLAGS) -o $@ $< | |
12 | ||
13 | .cpp.o : | |
14 | $(CC) -c $(CPPFLAGS) -o $@ $< | |
15 | ||
16 | .cxx.o : | |
17 | $(CC) -c $(CPPFLAGS) -o $@ $< | |
18 | ||
19 | # the comment at the end of the next line is needed because otherwise autoconf | |
20 | # would remove this line completely - it contains a built-in hack to remove | |
21 | # any VPATH assignment not containing ':' | |
22 | VPATH = @PATH_IFS@$(top_srcdir)/$(program_dir) # ':' for autoconf | |
23 | ||
24 | # Set defaults from configure | |
25 | include $(top_builddir)/src/make.env | |
26 | ||
27 | all: $(BIN_PROGRAM) install_dirs install_data | |
28 | ||
29 | $(BIN_PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ | |
30 | $(CC) $(LDFLAGS) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) | |
31 | ||
32 | install_dirs: | |
33 | @list='$(DATADIRS)'; for p in $$list; do \ | |
34 | mkdir -p $(top_builddir)/$(program_dir)/$$p; \ | |
35 | done | |
36 | ||
37 | install_data: | |
38 | @list='$(DATAFILES)'; for p in $$list; do \ | |
39 | if test ! -s $(top_builddir)/$(program_dir)/$$p; then \ | |
40 | cp -pRf $(top_srcdir)/$(program_dir)/$$p $(top_builddir)/$(program_dir)/$$p; \ | |
41 | fi; \ | |
42 | done | |
43 | ||
44 | clean: | |
45 | rm -f $(OBJECTS) $(BIN_PROGRAM) core |