From 5df79c53745fde5d6c3340a2979b1429cd5892c1 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sat, 8 Oct 2011 20:30:28 +0200 Subject: Initial import of htcd system 1.0 Signed-off-by: Henrik Rydberg --- src/makefile | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 src/makefile (limited to 'src/makefile') diff --git a/src/makefile b/src/makefile new file mode 100644 index 0000000..09670b2 --- /dev/null +++ b/src/makefile @@ -0,0 +1,177 @@ + ######################################################################### + # + # HTCd - Copyright (C) 1998-2006 Henrik Rydberg + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + # + +LIBRARY = libhtc.a +INSTALL = ../bin + +############################################################################ + +MODULE += mt +mt_c = test +mt_o = cfind crfind strip \ + sfind srfind sfindtab srfindtab scomptab sconvert \ + find_of rfind_of find_not_of rfind_not_of skip_parentesis \ + stringref mstream mread mstring mset msmap \ + random dates lock lookup issue config + + +MODULE += mime +mime_c = test +mime_o = mime def mailbox base64 qp pack + + +MODULE += mail +mail_c = inbox move list + + +MODULE += http +http_c = test +http_o = mime req resp + + +MODULE += ops +ops_c = test +ops_o = operator express basic comp string latex + + +MODULE += hdb +hdb_c = test hdbtest hdbcvt hdbfix +hdb_o = filemap sortable db comp cvt + + +MODULE += hed +hed_c = test hed +hed_o = input edit tables +hed_x = hed + + +MODULE += lang +lang_c = test +lang_o = token env parse ops basic func latex help flow db lang + + +MODULE += sh +sh_c = htc +sh_o = file convert dates user tree sys net main +sh_x = htc + +MODULE += serv +serv_c = htcs +serv_o = direct request const auth form tempmap main +serv_x = htcs + +MODULE += net +net_c = test htcd redirect route80 +net_o = isocket server thrserv +net_x = htcd redirect + +MODULE += labat +labat_c = atomlab +labat_f = labat +labat_o = resten deriv grad grabgr laplac laplac2 ggaexc \ + exchen ldaec gcor ggaec ggauxc exchpt ldauc \ + ggauc spline splint +labat_x = atomlab labat + +############################################################################ + +CTARGET = $(foreach mod,$(MODULE),\ + $(addprefix $(mod)/,$($(mod)_c))) + +FTARGET = $(foreach mod,$(MODULE),\ + $(addprefix $(mod)/,$($(mod)_f))) + +LTARGET = $(foreach mod,$(MODULE),\ + $(addprefix $(mod)/,$($(mod)_o))) + +XTARGET = $(foreach mod,$(MODULE),\ + $(addprefix $(mod)/,$($(mod)_x))) + +XLIST = $(foreach mod,$(MODULE),$($(mod)_x)) + +CTARG = $(addprefix tmp/bin/,$(CTARGET)) +FTARG = $(addprefix tmp/bin/,$(FTARGET)) +XTARG = $(addprefix tmp/bin/,$(XTARGET)) +COBJ = $(addprefix tmp/obj/c/,$(addsuffix .o,$(CTARGET))) +FOBJ = $(addprefix tmp/obj/f/,$(addsuffix .o,$(FTARGET))) +LOBJ = $(addprefix tmp/obj/l/,$(addsuffix .o,$(LTARGET))) +TLIB = $(addprefix tmp/obj/,$(LIBRARY)) + +############################################################################ + +INCLUDE = -I. +COPT = -O3 -pthread +FOPT = -O5 +CLIBS = -lncurses +FLIBS = + +.PHONY: all man html clean mkobj install +.PRECIOUS: tmp/obj/c/%.o tmp/obj/f/%.o tmp/obj/l/%.o + +############################################################################ + +all: $(LOBJ) $(TLIB) $(FOBJ) $(COBJ) $(FTARG) $(CTARG) + +tmp/bin/%: tmp/obj/c/%.o $(TLIB) + @mkdir -p $(@D) + g++ $(COPT) $< $(TLIB) $(CLIBS) -o $@ + +tmp/bin/%: tmp/obj/f/%.o $(TLIB) + @mkdir -p $(@D) + f77 $(FOPT) $< $(TLIB) $(FLIBS) -o $@ + +tmp/obj/c/%.o: %.cc + @mkdir -p $(@D) + gcc $(INCLUDE) $(COPT) -c $< -o $@ + +tmp/obj/f/%.o: %.f + @mkdir -p $(@D) + f77 $(FOPT) -c $< -o $@ + +$(TLIB): $(LOBJ) + @rm -f $(TLIB) + ar qc $(TLIB) $(LOBJ) + +tmp/obj/l/%.o: %.cc + @mkdir -p $(@D) + gcc $(INCLUDE) $(COPT) -c $< -o $@ + +tmp/obj/l/%.o: %.f + @mkdir -p $(@D) + f77 $(FOPT) -c $< -o $@ + +man: + @rm -rf tmp/man + doxygen etc/doxman + +html: + @rm -rf tmp/html + doxygen etc/doxhtml + +install: $(XTARG) + @mkdir -p $(INSTALL) + cp -rfp $(XTARG) $(INSTALL) + +clean: + rm -rf tmp + +distclean: + rm -rf tmp; cd $(INSTALL); rm -rf $(XLIST) + +############################################################################ -- cgit v1.2.3