schema-related information (like schema version, DB syntax, etc.) moved from "config...
[public/netxms.git] / sql / Makefile.w32
CommitLineData
feea53fd
VK
1#
2# Makefile for SQL scripts (Win32)
3#
4
5CPP = cpp
6
4f23eecc
VK
7sql_SCRIPTS = dbinit_mysql.sql \
8 dbinit_pgsql.sql \
9 dbinit_mssql.sql \
10 dbinit_oracle.sql \
11 dbinit_sqlite.sql \
12 dbschema_mysql.sql \
13 dbschema_pgsql.sql \
14 dbschema_mssql.sql \
15 dbschema_oracle.sql \
16 dbschema_sqlite.sql
feea53fd
VK
17
18ROOT_FILE = dbinit.in
28f5b9a4 19SOURCE = $(ROOT_FILE) database.in schema.in metadata.in setup.in events.in images.in maps.in policy.in objtools.in scripts.in maps.in
17a48052
VK
20HEADERS = ../include/netxmsdb.h ../include/nxevent.h ../include/nximage.h ../src/server/include/nms_locks.h
21COMMAND = $(CPP) -P -Wundef -D_NETXMS_DB_SCHEMA_ -I../include -I../src/server/include
feea53fd
VK
22SQUEEZE = perl -e "while (<>) { if (! /^[\s\t\n]*$$/) { print; } }"
23
24all: $(sql_SCRIPTS)
25
a97797f8 26dbinit_mysql.sql: $(SOURCE) $(HEADERS)
feea53fd
VK
27 $(COMMAND) -DDB_MYSQL $(ROOT_FILE) | $(SQUEEZE) > $@
28
a97797f8 29dbinit_pgsql.sql: $(SOURCE) $(HEADERS)
feea53fd
VK
30 $(COMMAND) -DDB_POSTGRESQL $(ROOT_FILE) | $(SQUEEZE) > $@
31
a97797f8 32dbinit_mssql.sql: $(SOURCE) $(HEADERS)
feea53fd
VK
33 $(COMMAND) -DDB_MSSQL $(ROOT_FILE) | $(SQUEEZE) > $@
34
fa3f5211
VK
35dbinit_oracle.sql: $(SOURCE) $(HEADERS)
36 $(COMMAND) -DDB_ORACLE $(ROOT_FILE) | $(SQUEEZE) > $@
37
7dbb6862
VK
38dbinit_sqlite.sql: $(SOURCE) $(HEADERS)
39 $(COMMAND) -DDB_SQLITE $(ROOT_FILE) | $(SQUEEZE) > $@
40
4f23eecc
VK
41dbschema_mysql.sql: $(SOURCE) $(HEADERS)
42 $(COMMAND) -DDB_MYSQL -DSCHEMA_ONLY $(ROOT_FILE) | $(SQUEEZE) > $@
43
44dbschema_pgsql.sql: $(SOURCE) $(HEADERS)
45 $(COMMAND) -DDB_POSTGRESQL -DSCHEMA_ONLY $(ROOT_FILE) | $(SQUEEZE) > $@
46
47dbschema_mssql.sql: $(SOURCE) $(HEADERS)
48 $(COMMAND) -DDB_MSSQL -DSCHEMA_ONLY $(ROOT_FILE) | $(SQUEEZE) > $@
49
50dbschema_oracle.sql: $(SOURCE) $(HEADERS)
51 $(COMMAND) -DDB_ORACLE -DSCHEMA_ONLY $(ROOT_FILE) | $(SQUEEZE) > $@
52
d394f0ed
VK
53dbschema_sqlite.sql: $(SOURCE) $(HEADERS)
54 $(COMMAND) -DDB_SQLITE -DSCHEMA_ONLY $(ROOT_FILE) | $(SQUEEZE) > $@
55
feea53fd 56clean:
00c79c7b 57 cmd /c del dbinit_*.sql