build fltk gui stuff as a library
authorDiane Trout <diane@caltech.edu>
Tue, 21 Feb 2006 23:01:44 +0000 (23:01 +0000)
committerDiane Trout <diane@caltech.edu>
Tue, 21 Feb 2006 23:01:44 +0000 (23:01 +0000)
Makefile
gui/module.mk
module.mk

index 2315302faea28affab346150d731c56ead5c896d..eb4f00e6bdfb7f7aa1683642a53481d6257fcd37 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,32 @@
 BASEDIR := ./
 
+BINEXT := 
+OBJEXT := .o
+LIBEXT := .a
+
 CXXFLAGS :=  
 LDFLAGS := -lfltk
 
 # each module will add to this, .os are derived from it
+TARGETLIBS := 
+TARGETBINS :=
+LIBS := 
+LIBSRC := 
 SRC := 
 
-include module.mk
-include gui/module.mk
+all: targets
 
+include gui/module.mk
+include module.mk
 
 # process what the module.mks defined
 OBJ := $(patsubst %.cxx,%.o, $(filter %.cxx,$(SRC)))
 DEPS := $(OBJ:.o=.d)
 
-mussa: $(OBJ)
-       g++ -o $@ $(CXXFLAGS) $(LDFLAGS) $^
+targets: $(TARGETLIBS) $(TARGETBINS)
+
+#mussa: $(OBJ)
+#      g++ -o $@ $(CXXFLAGS) $(LDFLAGS) $^
 
 %.d: %.cxx
        makedepend -o.d $(dirname $^) $(CFLAGS) $(CXXFILAGS) $^ -f- > $@
index 31e12863fc5fa0ec2da5b12fda5999475fd37134..a150b7636da07d15daaee0917dc3e30db3d1ca33 100644 (file)
@@ -10,6 +10,18 @@ SOURCES.cxx := AnnotWindow.cxx \
                                                         SetupWindow.cxx \
                                                         SubAnalysisWindow.cxx
 
-SRC += $(addprefix $(CURDIR), $(SOURCES.cxx))
+MUSSA_FLTK_SRC := $(addprefix $(CURDIR), $(SOURCES.cxx))
+
+SRC += $(MUSSA_FLTK_SRC)
 CXXFLAGS += -I$(CURDIR)
 
+MUSSA_FLTK_LIB := $(CURDIR)libmussa_fltk$(LIBEXT)
+LIBDIRS += -L$(CURDIR)
+
+TARGETLIBS += $(MUSSA_FLTK_LIB)
+
+$(MUSSA_FLTK_LIB): $(MUSSA_FLTK_SRC:.cxx=$(OBJEXT))
+       $(AR) rv $@ $?
+       #g++ -static -lfltk -o $@ $?
+       #$(call bless_library,$@)
+
index b86e71104960f30ded5b5af65c244d09c9117072..c57b25160b3615c627b5a06b1191e76349b9c300 100644 (file)
--- a/module.mk
+++ b/module.mk
@@ -11,6 +11,14 @@ SOURCES.cxx := flp.cxx \
                                                         #seqcomp.cxx \ #(old seqcomp)
                                                         #mussa_nway_refine.cxx \ (broken code)
 
-SRC += $(addprefix $(CURDIR), $(SOURCES.cxx))
+MUSSASRC := $(addprefix $(CURDIR), $(SOURCES.cxx))
+
+SRC += $(MUSSASRC)
 CXXFLAGS += -I$(CURDIR)
 
+MUSSA := $(CURDIR)/mussa$(BINEXT) 
+TARGETBINS += $(MUSSA)
+
+$(MUSSA): $(MUSSASRC:.cxx=$(OBJEXT)) $(MUSSA_FLTK_LIB)
+       g++ -lfltk -o $@ $(MUSSASRC:.cxx=$(OBJEXT)) $(MUSSA_FLTK_LIB)
+