add $(EXEEXT) to executable targets during installation for MinGW
[suif.git] / Makefile.rules
blob21b145fb57bd8749e97f1daecd12fec2a95d3d80
1 # Rules shared between Makefile.std and Makefile.sub
3 vpath %,v RCS
5 space := $(empty) $(empty)
7 # Set up search path for library dependencies
8 # Note: It is important to avoid these vpath directives when compiling
9 # libraries, because otherwise the directories are searched for the target.
10 ifneq ($(strip $(LIBS)),)
11 ifneq ($(strip $(LOCALLIBDIRS)),)
12 vpath %.a $(subst $(space),:,$(subst -L,,$(LOCALLIBDIRS)))
13 vpath %.so $(subst $(space),:,$(subst -L,,$(LOCALLIBDIRS)))
14 endif
15 vpath %.a $(LIBDIR)
16 vpath %.so $(SODIR)
17 ifneq ($(strip $(GLOBALLIBDIRS)),)
18 vpath %.a $(subst $(space),:,$(subst -L,,$(GLOBALLIBDIRS)))
19 vpath %.so $(subst $(space),:,$(subst -L,,$(GLOBALLIBDIRS)))
20 endif
21 endif
23 # Special rule: the standard makefiles should always be the most recent
24 # versions.
26 FORCE:
28 %.cc : %.y
29                 @rm -f $@
30                 $(YACC) $(YFLAGS) $<
31                 @chmod 444 y.tab.c
32                 mv y.tab.c $@
34 %.c : %.y
35                 @rm -f $@
36                 $(YACC) $(YFLAGS) $<
37                 @chmod 444 y.tab.c
38                 mv y.tab.c $@
40 %.h : %.y
41                 @rm -f $@
42                 $(YACC) -d $(YFLAGS) $<
43                 @chmod 444 y.tab.h
44                 mv y.tab.h $@
45                 @rm -f y.tab.c
47 %.h %.cc : %.dflow
48                 @rm -f $*.h $*.cc
49                 $(SHARLIT) $(SHARLIT_FLAGS) -T $<
50                 @sed -e 's/solver.h/$*.h/' solver.cc > $*.cc
51                 @mv solver.h $*.h
52                 @chmod 444 $*.h $*.cc
53                 @rm -f solver.cc
55 %.h %.cc : %.odflow
56                 @rm -f $*.h $*.cc
57                 $(SHARLIT) $(SHARLIT_FLAGS) $<
58                 @sed -e 's/solver.h/$*.h/' solver.cc >$*.cc
59                 @mv solver.h $*.h
60                 @chmod 444 $*.h $*.cc
61                 @rm -f solver.cc