1# -*- makefile -*- Time-stamp: <03/10/27 18:15:05 ptr>
2# $Id: rules-so.mak 3113 2007-08-08 19:05:21Z dums $
3
4# Shared libraries tags
5
6PHONY += release-shared dbg-shared stldbg-shared
7
8release-shared:	$(OUTPUT_DIR) ${SO_NAME_OUT}
9
10dbg-shared:	$(OUTPUT_DIR_DBG) ${SO_NAME_OUT_DBG}
11
12stldbg-shared:	$(OUTPUT_DIR_STLDBG) ${SO_NAME_OUT_STLDBG}
13
14ifeq (bcc, $(COMPILER_NAME))
15# Borland linker
16${SO_NAME_OUT}:	$(OBJ) $(RES) $(LIBSDEP)
17	$(LINK.cc) $(subst /,\\,$(START_OBJ) $(OBJ) $(END_OBJ), $(LINK_OUTPUT_OPTION), , $(LDLIBS), , $(RES))
18${SO_NAME_OUT_DBG}:	$(OBJ_DBG) $(RES_DBG) $(LIBSDEP)
19	$(LINK.cc) $(subst /,\\,$(START_OBJ) $(OBJ_DBG) $(END_OBJ), $(LINK_OUTPUT_OPTION), , $(LDLIBS), , $(RES_DBG))
20${SO_NAME_OUT_STLDBG}:	$(OBJ_STLDBG) $(RES_STLDBG) $(LIBSDEP)
21	$(LINK.cc) $(subst /,\\,$(START_OBJ) $(OBJ_STLDBG) $(END_OBJ), $(LINK_OUTPUT_OPTION), , $(LDLIBS), , $(RES_STLDBG))
22else
23ifeq (dmc, $(COMPILER_NAME))
24# Digital Mars linker
25$(SO_NAME_OUT): $(OBJ) $(RES) $(LIBSDEP)
26	@echo LIBRARY "$(SO_NAME_BASE).dll" > $(OUTPUT_DIR)/$(SO_NAME_BASE).def
27	@echo DESCRIPTION \'STLport DLL for Digital Mars C/C++\'>> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
28	@echo EXETYPE NT>> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
29	@echo SUBSYSTEM WINDOWS>> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
30	@echo CODE SHARED EXECUTE>> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
31	@echo DATA READWRITE>> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
32	@echo >> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
33	@echo EXPORTS>> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
34	@echo '?cin@std@@3V?$$basic_istream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
35	@echo '?cout@std@@3V?$$basic_ostream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
36	@echo '?cerr@std@@3V?$$basic_ostream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
37	@echo '?clog@std@@3V?$$basic_ostream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
38	@echo '?wcin@std@@3V?$$basic_istream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
39	@echo '?wcout@std@@3V?$$basic_ostream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
40	@echo '?wcerr@std@@3V?$$basic_ostream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
41	@echo '?wclog@std@@3V?$$basic_ostream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR)/$(SO_NAME_BASE).def
42	$(LINK.cc) $(subst /,\\,$(OBJ),$(LINK_OUTPUT_OPTION),$(MAP_OUTPUT_OPTION),$(LDLIBS),$(DEF_OPTION),$(RES))
43
44$(SO_NAME_OUT_DBG): $(OBJ_DBG) $(RES_DBG) $(LIBSDEP)
45	@echo LIBRARY "$(SO_NAME_DBG_BASE).dll" > $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
46	@echo DESCRIPTION \'STLport DLL for Digital Mars C/C++\'>> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
47	@echo EXETYPE NT>> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
48	@echo SUBSYSTEM WINDOWS>> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
49	@echo CODE SHARED EXECUTE>> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
50	@echo DATA READWRITE>> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
51	@echo >> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
52	@echo EXPORTS>> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
53	@echo '?cin@std@@3V?$$basic_istream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
54	@echo '?cout@std@@3V?$$basic_ostream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
55	@echo '?cerr@std@@3V?$$basic_ostream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
56	@echo '?clog@std@@3V?$$basic_ostream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
57	@echo '?wcin@std@@3V?$$basic_istream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
58	@echo '?wcout@std@@3V?$$basic_ostream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
59	@echo '?wcerr@std@@3V?$$basic_ostream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
60	@echo '?wclog@std@@3V?$$basic_ostream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR_DBG)/$(SO_NAME_DBG_BASE).def
61	$(LINK.cc) $(subst /,\\,$(OBJ_DBG),$(LINK_OUTPUT_OPTION),$(MAP_OUTPUT_OPTION),$(LDLIBS),$(DEF_OPTION_DBG),$(RES_DBG))
62
63$(SO_NAME_OUT_STLDBG):	$(OBJ_STLDBG) $(RES_STLDBG) $(LIBSDEP)
64	@echo LIBRARY "$(SO_NAME_STLDBG_BASE).dll" > $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
65	@echo DESCRIPTION \'STLport DLL for Digital Mars C/C++\'>> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
66	@echo EXETYPE NT>> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
67	@echo SUBSYSTEM WINDOWS>> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
68	@echo CODE SHARED EXECUTE>> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
69	@echo DATA READWRITE>> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
70	@echo >> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
71	@echo EXPORTS>> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
72	@echo '?cin@std@@3V?$$basic_istream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
73	@echo '?cout@std@@3V?$$basic_ostream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
74	@echo '?cerr@std@@3V?$$basic_ostream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
75	@echo '?clog@std@@3V?$$basic_ostream@std@DV?$$char_traits@std@D@1@@1@A' >> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
76	@echo '?wcin@std@@3V?$$basic_istream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
77	@echo '?wcout@std@@3V?$$basic_ostream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
78	@echo '?wcerr@std@@3V?$$basic_ostream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
79	@echo '?wclog@std@@3V?$$basic_ostream@std@_YV?$$char_traits@std@_Y@1@@1@A' >> $(OUTPUT_DIR_STLDBG)/$(SO_NAME_STLDBG_BASE).def
80	$(LINK.cc) $(subst /,\\,$(OBJ_STLDBG), $(LINK_OUTPUT_OPTION), $(MAP_OUTPUT_OPTION), $(LDLIBS), $(DEF_OPTION_STLDBG), $(RES_STLDBG))
81
82else
83# GNU linker
84${SO_NAME_OUT}:	$(OBJ) $(RES) $(LIBSDEP) $(LSUPC++DEF)
85	$(LINK.cc) $(LINK_OUTPUT_OPTION) $(OBJ) $(RES) $(LSUPC++DEF) $(LDLIBS) $(STDLIBS)
86${SO_NAME_OUT_DBG}:	$(OBJ_DBG) $(RES_DBG) $(LIBSDEP) $(LSUPC++DEF)
87	$(LINK.cc) $(LINK_OUTPUT_OPTION) $(OBJ_DBG) $(RES_DBG) $(LSUPC++DEF) $(LDLIBS) $(STDLIBS)
88${SO_NAME_OUT_STLDBG}:	$(OBJ_STLDBG) $(RES_STLDBG) $(LIBSDEP) $(LSUPC++DEF)
89	$(LINK.cc) $(LINK_OUTPUT_OPTION) $(OBJ_STLDBG) $(RES_STLDBG) $(LSUPC++DEF) $(LDLIBS) $(STDLIBS)
90endif
91endif
92