[Bio] / ReleaseTools / standard.mk Repository:
ViewVC logotype

Diff of /ReleaseTools/standard.mk

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12, Tue Apr 12 20:23:17 2005 UTC revision 1.13, Wed Apr 13 01:45:12 2005 UTC
# Line 22  Line 22 
22  # Document macros users define in their package level makefiles here:  # Document macros users define in their package level makefiles here:
23  ########################################################################  ########################################################################
24  #  #
25  # CBINS       := foo bar etc.  List of .c binaries to build. Do not put .c  # CBINS       := foo.c bar.c etc.  List of .c binaries to build.
26  #                in the name  #
27  # CEXCLUDE    := list of .c files, besides $(CBINS).c, to exclude from the  # CEXCLUDES   := list of .c files, besides $(CBINS), to exclude from the
28  #                list of C code to build into a .o  #                list of C code to build into a .o
29  #  #
30  #  #
# Line 56  Line 56 
56    
57  LIBPYFILES := $(filter-out $(BINPYSCRIPTS) $(SCHEMATOOLS), $(wildcard *.py))  LIBPYFILES := $(filter-out $(BINPYSCRIPTS) $(SCHEMATOOLS), $(wildcard *.py))
58  LIBPERLFILES := $(filter-out $(BINPERLSCRIPTS), $(wildcard *.pl))  LIBPERLFILES := $(filter-out $(BINPERLSCRIPTS), $(wildcard *.pl))
59    LIBCFILES := $(foreach var, $(filter-out $(CBINS) $(CEXCLUDES), $(wildcard *.c)), $(libdir)/$(PKGNAME)/$(subst .c,.o,$(var)))
60    
61    test:
62            echo foo
63            echo $(CBINS)
64            echo $(wildcard *.c)
65            echo $(LIBCFILES)
66    
67  ########################################################################  ########################################################################
68  # Package-level makefile Targets  # Package-level makefile Targets
# Line 67  Line 73 
73    
74  all: schematools lib bin  all: schematools lib bin
75    
76  bin:      $(foreach var, $(BINPYSCRIPTS), $(subst .py,,$(bindir)/$(var))) $(foreach var, $(BINPERLSCRIPTS), $(subst .pl,,$(bindir)/$(var))) $(foreach var, $(BINSHSCRIPTS), $(subst .sh,,$(bindir)/$(var))) $(foreach var, $(BINSCRIPTS), $(bindir)/$(var)) $(foreach var, $(CBINS), $(bindir)/$(var))  bin:      $(foreach var, $(BINPYSCRIPTS), $(subst .py,,$(bindir)/$(var))) $(foreach var, $(BINPERLSCRIPTS), $(subst .pl,,$(bindir)/$(var))) $(foreach var, $(BINSHSCRIPTS), $(subst .sh,,$(bindir)/$(var))) $(foreach var, $(BINSCRIPTS), $(bindir)/$(var)) $(foreach var, $(CBINS), $(subst .c,,$(bindir)/$(var)))
77    
78  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var)) $(foreach var, $(LIBPERLFILES), $(libdir)/$(PKGNAME)/$(var))  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var)) $(foreach var, $(LIBPERLFILES), $(libdir)/$(PKGNAME)/$(var)) $(LIBCFILES)
79    
80  schematools: stDeclFiles stGeneratedFiles  schematools: stDeclFiles stGeneratedFiles
81    
# Line 77  Line 83 
83    
84  stGeneratedFiles: $(foreach var, $(subst .py,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var)_st.py) $(foreach var, $(subst .py,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var).sql) $(foreach var, $(subst .py,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var)DbiHandler.py)  stGeneratedFiles: $(foreach var, $(subst .py,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var)_st.py) $(foreach var, $(subst .py,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var).sql) $(foreach var, $(subst .py,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var)DbiHandler.py)
85    
86  test:  #test:
87    
88  clean:  clean:
89    
# Line 89  Line 95 
95  # lib related  # lib related
96  ##  ##
97    
98    $(libdir)/$(PKGNAME)/%.o:  $(TOPDIR)/$(PKGNAME)/%.c
99            $(CC) $(CFLAGS) -c -o $@ $<
100    
101  $(libdir)/$(PKGNAME)/%.py: $(TOPDIR)/$(PKGNAME)/%.py  $(libdir)/$(PKGNAME)/%.py: $(TOPDIR)/$(PKGNAME)/%.py
102          cp -p  $< $@          cp -p  $< $@
103    
# Line 132  Line 141 
141    
142  # C excecutables.  # C excecutables.
143  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.c  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.c
144          $(CC) $(CFLAGS) -o $@ $<          $(CC) $(CFLAGS) -o $@ $< $(wildcard $(libdir)/$(PKGNAME)/*.o)
145    
146  # python scripts. make script, "foo" from "foo.py".  (rewrite path #! someday)  # python scripts. make script, "foo" from "foo.py".  (rewrite path #! someday)
147  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.py  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.py

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3