diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2011-10-08 20:30:28 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-10-08 20:30:28 +0200 |
| commit | 5df79c53745fde5d6c3340a2979b1429cd5892c1 (patch) | |
| tree | 1a81af141708b826e9c61e8a04019994fcca8298 /src/makefile | |
Initial import of htcd system 1.0
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/makefile')
| -rw-r--r-- | src/makefile | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/src/makefile b/src/makefile new file mode 100644 index 0000000..09670b2 --- /dev/null +++ b/src/makefile | |||
| @@ -0,0 +1,177 @@ | |||
| 1 | ######################################################################### | ||
| 2 | # | ||
| 3 | # HTCd - Copyright (C) 1998-2006 Henrik Rydberg | ||
| 4 | # | ||
| 5 | # This program is free software; you can redistribute it and/or modify | ||
| 6 | # it under the terms of the GNU General Public License as published by | ||
| 7 | # the Free Software Foundation; either version 2 of the License, or | ||
| 8 | # (at your option) any later version. | ||
| 9 | # | ||
| 10 | # This program is distributed in the hope that it will be useful, | ||
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | # GNU General Public License for more details. | ||
| 14 | # | ||
| 15 | # You should have received a copy of the GNU General Public License | ||
| 16 | # along with this program; if not, write to the Free Software | ||
| 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | # | ||
| 19 | |||
| 20 | LIBRARY = libhtc.a | ||
| 21 | INSTALL = ../bin | ||
| 22 | |||
| 23 | ############################################################################ | ||
| 24 | |||
| 25 | MODULE += mt | ||
| 26 | mt_c = test | ||
| 27 | mt_o = cfind crfind strip \ | ||
| 28 | sfind srfind sfindtab srfindtab scomptab sconvert \ | ||
| 29 | find_of rfind_of find_not_of rfind_not_of skip_parentesis \ | ||
| 30 | stringref mstream mread mstring mset msmap \ | ||
| 31 | random dates lock lookup issue config | ||
| 32 | |||
| 33 | |||
| 34 | MODULE += mime | ||
| 35 | mime_c = test | ||
| 36 | mime_o = mime def mailbox base64 qp pack | ||
| 37 | |||
| 38 | |||
| 39 | MODULE += mail | ||
| 40 | mail_c = inbox move list | ||
| 41 | |||
| 42 | |||
| 43 | MODULE += http | ||
| 44 | http_c = test | ||
| 45 | http_o = mime req resp | ||
| 46 | |||
| 47 | |||
| 48 | MODULE += ops | ||
| 49 | ops_c = test | ||
| 50 | ops_o = operator express basic comp string latex | ||
| 51 | |||
| 52 | |||
| 53 | MODULE += hdb | ||
| 54 | hdb_c = test hdbtest hdbcvt hdbfix | ||
| 55 | hdb_o = filemap sortable db comp cvt | ||
| 56 | |||
| 57 | |||
| 58 | MODULE += hed | ||
| 59 | hed_c = test hed | ||
| 60 | hed_o = input edit tables | ||
| 61 | hed_x = hed | ||
| 62 | |||
| 63 | |||
| 64 | MODULE += lang | ||
| 65 | lang_c = test | ||
| 66 | lang_o = token env parse ops basic func latex help flow db lang | ||
| 67 | |||
| 68 | |||
| 69 | MODULE += sh | ||
| 70 | sh_c = htc | ||
| 71 | sh_o = file convert dates user tree sys net main | ||
| 72 | sh_x = htc | ||
| 73 | |||
| 74 | MODULE += serv | ||
| 75 | serv_c = htcs | ||
| 76 | serv_o = direct request const auth form tempmap main | ||
| 77 | serv_x = htcs | ||
| 78 | |||
| 79 | MODULE += net | ||
| 80 | net_c = test htcd redirect route80 | ||
| 81 | net_o = isocket server thrserv | ||
| 82 | net_x = htcd redirect | ||
| 83 | |||
| 84 | MODULE += labat | ||
| 85 | labat_c = atomlab | ||
| 86 | labat_f = labat | ||
| 87 | labat_o = resten deriv grad grabgr laplac laplac2 ggaexc \ | ||
| 88 | exchen ldaec gcor ggaec ggauxc exchpt ldauc \ | ||
| 89 | ggauc spline splint | ||
| 90 | labat_x = atomlab labat | ||
| 91 | |||
| 92 | ############################################################################ | ||
| 93 | |||
| 94 | CTARGET = $(foreach mod,$(MODULE),\ | ||
| 95 | $(addprefix $(mod)/,$($(mod)_c))) | ||
| 96 | |||
| 97 | FTARGET = $(foreach mod,$(MODULE),\ | ||
| 98 | $(addprefix $(mod)/,$($(mod)_f))) | ||
| 99 | |||
| 100 | LTARGET = $(foreach mod,$(MODULE),\ | ||
| 101 | $(addprefix $(mod)/,$($(mod)_o))) | ||
| 102 | |||
| 103 | XTARGET = $(foreach mod,$(MODULE),\ | ||
| 104 | $(addprefix $(mod)/,$($(mod)_x))) | ||
| 105 | |||
| 106 | XLIST = $(foreach mod,$(MODULE),$($(mod)_x)) | ||
| 107 | |||
| 108 | CTARG = $(addprefix tmp/bin/,$(CTARGET)) | ||
| 109 | FTARG = $(addprefix tmp/bin/,$(FTARGET)) | ||
| 110 | XTARG = $(addprefix tmp/bin/,$(XTARGET)) | ||
| 111 | COBJ = $(addprefix tmp/obj/c/,$(addsuffix .o,$(CTARGET))) | ||
| 112 | FOBJ = $(addprefix tmp/obj/f/,$(addsuffix .o,$(FTARGET))) | ||
| 113 | LOBJ = $(addprefix tmp/obj/l/,$(addsuffix .o,$(LTARGET))) | ||
| 114 | TLIB = $(addprefix tmp/obj/,$(LIBRARY)) | ||
| 115 | |||
| 116 | ############################################################################ | ||
| 117 | |||
| 118 | INCLUDE = -I. | ||
| 119 | COPT = -O3 -pthread | ||
| 120 | FOPT = -O5 | ||
| 121 | CLIBS = -lncurses | ||
| 122 | FLIBS = | ||
| 123 | |||
| 124 | .PHONY: all man html clean mkobj install | ||
| 125 | .PRECIOUS: tmp/obj/c/%.o tmp/obj/f/%.o tmp/obj/l/%.o | ||
| 126 | |||
| 127 | ############################################################################ | ||
| 128 | |||
| 129 | all: $(LOBJ) $(TLIB) $(FOBJ) $(COBJ) $(FTARG) $(CTARG) | ||
| 130 | |||
| 131 | tmp/bin/%: tmp/obj/c/%.o $(TLIB) | ||
| 132 | @mkdir -p $(@D) | ||
| 133 | g++ $(COPT) $< $(TLIB) $(CLIBS) -o $@ | ||
| 134 | |||
| 135 | tmp/bin/%: tmp/obj/f/%.o $(TLIB) | ||
| 136 | @mkdir -p $(@D) | ||
| 137 | f77 $(FOPT) $< $(TLIB) $(FLIBS) -o $@ | ||
| 138 | |||
| 139 | tmp/obj/c/%.o: %.cc | ||
| 140 | @mkdir -p $(@D) | ||
| 141 | gcc $(INCLUDE) $(COPT) -c $< -o $@ | ||
| 142 | |||
| 143 | tmp/obj/f/%.o: %.f | ||
| 144 | @mkdir -p $(@D) | ||
| 145 | f77 $(FOPT) -c $< -o $@ | ||
| 146 | |||
| 147 | $(TLIB): $(LOBJ) | ||
| 148 | @rm -f $(TLIB) | ||
| 149 | ar qc $(TLIB) $(LOBJ) | ||
| 150 | |||
| 151 | tmp/obj/l/%.o: %.cc | ||
| 152 | @mkdir -p $(@D) | ||
| 153 | gcc $(INCLUDE) $(COPT) -c $< -o $@ | ||
| 154 | |||
| 155 | tmp/obj/l/%.o: %.f | ||
| 156 | @mkdir -p $(@D) | ||
| 157 | f77 $(FOPT) -c $< -o $@ | ||
| 158 | |||
| 159 | man: | ||
| 160 | @rm -rf tmp/man | ||
| 161 | doxygen etc/doxman | ||
| 162 | |||
| 163 | html: | ||
| 164 | @rm -rf tmp/html | ||
| 165 | doxygen etc/doxhtml | ||
| 166 | |||
| 167 | install: $(XTARG) | ||
| 168 | @mkdir -p $(INSTALL) | ||
| 169 | cp -rfp $(XTARG) $(INSTALL) | ||
| 170 | |||
| 171 | clean: | ||
| 172 | rm -rf tmp | ||
| 173 | |||
| 174 | distclean: | ||
| 175 | rm -rf tmp; cd $(INSTALL); rm -rf $(XLIST) | ||
| 176 | |||
| 177 | ############################################################################ | ||
