source: trunk/tools/database/makefile.icc@ 1036

Last change on this file since 1036 was 830, checked in by bird, 26 years ago

Initial checkin of the database.

File size: 3.3 KB
Line 
1# $Id: makefile.icc,v 1.1 1999-09-05 02:56:39 bird Exp $
2
3#
4# Common makefile for database utils. ICC and GCC(DB.DLL only)
5#
6
7# include common definitions
8PDWIN32_INCLUDE = ..\..\include
9!include ..\..\include\pdwin32.mk
10
11# Addjust common definitions
12!ifdef DEBUG
13CFLAGS = $(CFLAGS) -Ge+ -Tx+ -I$(PDWIN32_INCLUDE) -Igd -Imysql -I..\common -Wall+ppt-ppc-inl-cnv-gnr-vft-
14CXXFLAGS = $(CXXFLAGS) -Ge+ -Gx- -Tx+ -I$(PDWIN32_INCLUDE) -Igd -Imysql -I..\common -Wall+ppt-ppc-inl-cnv-gnr-vft-
15LDFLAGS = $(LDFLAGS) -Ge+ -Fe$@ /B"/MAP:full"
16!else
17CFLAGS = $(CFLAGS) -Ge+ -Tx+ -I$(PDWIN32_INCLUDE) -Igd -Imysql -I..\common -Wall+ppt-ppc-inl-cnv-gnr-vft-
18CXXFLAGS = $(CXXFLAGS) -Ge+ -Gx- -Tx+ -I$(PDWIN32_INCLUDE) -Igd -Imysql -I..\common -Wall+ppt-ppc-inl-cnv-gnr-vft-
19LDFLAGS = $(LDFLAGS) -Ge+ -Fe$@ /B"/MAP:full"
20!endif
21
22#
23# gcc defines
24#
25GCC = gcc
26# Note: old versions of GCC (< 2.8.x) may need the -fhandle-exceptions
27!ifdef DEBUG
28GCCFLAGS = -Zmt -Zdll -Zomf -mprobe -Imysql -g
29!else
30GCCFLAGS = -Zmt -Zdll -Zomf -mprobe -Imysql -s
31!endif
32
33
34
35#
36# All roule
37#
38all: db.dll db.lib APIImport.exe StateUpd.exe kHTMLPC.exe \
39 ..\bin\db.dll ..\bin\APIImport.exe ..\bin\StateUpd.exe \
40 ..\bin\kHTMLPC.exe
41
42
43#
44# Database DLL
45#
46db.dll: db.obj db.def
47 $(GCC) $** $(GCCFLAGS) -lmysql\libmysqlclient -lsocket
48
49..\bin\db.dll: db.dll
50 $(CP) $** $@
51
52db.lib: db.def
53 $(IMPLIB) $(IMPLIBFLAGS) $@ $**
54
55db.o: db.cpp
56 $(GCC) -c $(GCCFLAGS) $**
57
58db.obj: db.cpp
59 $(GCC) -c $(GCCFLAGS) $**
60
61
62
63#
64# APIImport
65#
66APIImport.exe: APIImport.obj ..\common\commonicc.lib db.lib
67 $(LD) $(LDFLAGS) $**
68
69APIImport.obj: APIImport.cpp APIImport.h db.h ..\common\kFileFormatBase.h \
70 ..\common\kFileDef.h ..\common\kFilePe.h
71
72..\bin\APIImport.exe: APIImport.exe
73 $(CP) $** $@
74
75..\common\commonicc.lib:
76 cd ..\common
77 nmake /nologo commonicc.lib
78 cd ..\database
79
80
81
82#
83# StateUpd
84#
85StateUpd.exe: StateUpd.obj db.lib
86 $(LD) $(LDFLAGS) $**
87
88..\bin\StateUpd.exe: StateUpd.exe
89 $(CP) $** $@
90
91StateUpd.obj: StateUpd.cpp db.h
92
93
94
95#
96# kHTMLPC - HTML/Sql PreCompiler.
97#
98kHTMLPC.exe: kHTMLPC.obj db.lib gd/gdicc.lib
99 $(LD) $(LDFLAGS) $**
100
101kHTMLPC.obj: kHTMLPC.cpp kHTMLPC.h db.h ..\common\kLIFO.cpp \
102 ..\common\kLIFO.h ..\common\kList.h ..\common\kList.cpp \
103 gd/gd.h gd/gdfontg.h gd/gdfontl.h gd/gdfontmb.h \
104 gd/gdfonts.h gd/gdfontt.h
105
106..\bin\kHTMLPC.exe: kHTMLPC.exe
107 $(CP) $** $@
108
109gd/gdicc.lib: NUL
110 @cd gd
111 @nmake /nologo gdicc.lib
112 @cd ..
113
114
115
116
117# kHTHMLPC - interference roules for preprocessing of kSqlHtml files.
118.SUFFIXES: .html .ksqlhtml .obj
119.kSqlHtml.html:
120 kHTMLPC $<
121.kSqlHtml.obj: # Visual SlickEdit thinks everything complies to .obj files...
122 kHTMLPC $<
123
124
125
126#
127# Odin32 - Creates the database. This will do a drop of any database named "Odin32"!
128#
129Odin32: CreateTables.sql States.sql Authors.sql
130 -mysqladmin refresh
131 mysqladmin DROP Odin32
132 mysql < CreateTables.sql
133 mysql < States.sql
134 mysql < Authors.sql
135 -mysqladmin refresh
136
137Authors: Authors.sql
138 mysql < Authors.sql
139 -mysqladmin refresh
140
141States: States.sql
142 mysql < States.sql
143 -mysqladmin refresh
144
145
146#
147# clean
148#
149clean:
150 -@$(RM) *.obj
151 -@$(RM) *.lib
152 -@$(RM) *.o
153 -@$(RM) *.a
154 -@$(RM) *.dll
155 -@$(RM) *.exe
156 -@$(RM) *.pch
157 -@$(RM) *.log
158 -@$(RM) *.map
159 @cd gd
160 @nmake /nologo clean
161
162
Note: See TracBrowser for help on using the repository browser.