optimise sqlite database creation a bit
[platform/upstream/crda.git] / Makefile
1 all:    regulatory.bin
2
3
4 regulatory.bin: regulatory.sqlite dbgen.py key.priv.pem
5         @./dbgen.py
6
7 clean:
8         @rm -f regulatory.sqlite regulatory.bin *~
9
10 regulatory.sqlite: db/*.sql
11         @rm -f requlatory.sqlite
12         @(for i in db/*.sql ; do \
13                 if [ $$i = "db/00-database.sql" ] ; then continue ; fi ;\
14                 sed 's/AUTO_INCREMENT/AUTOINCREMENT/; s/use regulatory;//' < $$i ;\
15         done) | sqlite3 regulatory.sqlite
16
17 generate_keys:
18         openssl genrsa -out key.priv.pem 2048