1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
# Project: codfis
CXX ?= g++
OBJ = src/main.o src/calccf.o src/dlg_db_ch.o src/struty.o src/dlg_info.o
LINKOBJ = src/main.o src/calccf.o src/dlg_db_ch.o src/struty.o src/dlg_info.o
LIBS = -L/usr/X11R6/lib -lXext -lX11 -lm -lfltk -lsqlite3 -lXpm
CXXINCS = -I"include"
BIN = codfis
DB = codfis.db3
DBSQL = src/codfis.sql
CXXFLAGS ?= -O2 -Wall -static
RM = rm -f
all: $(BIN) $(DB)
$(BIN): $(OBJ)
$(CXX) $(LDFLAGS) $(LINKOBJ) -o $(BIN) $(LIBS)
src/main.o: src/main.cpp
$(CXX) $(CPPFLAGS) -c src/main.cpp -o src/main.o $(CXXFLAGS) $(CXXINCS)
src/calccf.o: src/calccf.cpp
$(CXX) $(CPPFLAGS) -c src/calccf.cpp -o src/calccf.o $(CXXFLAGS) $(CXXINCS)
src/dlg_db_ch.o: src/dlg_db_ch.cpp
$(CXX) $(CPPFLAGS) -c src/dlg_db_ch.cpp -o src/dlg_db_ch.o $(CXXFLAGS) $(CXXINCS)
src/struty.o: src/struty.cpp
$(CXX) $(CPPFLAGS) -c src/struty.cpp -o src/struty.o $(CXXFLAGS) $(CXXINCS)
src/dlg_info.o: src/dlg_info.cpp
$(CXX) $(CPPFLAGS) -c src/dlg_info.cpp -o src/dlg_info.o $(CXXFLAGS) $(CXXINCS)
$(DB): $(DBSQL)
# sqlite3 -init $(DBSQL) $(DB) .quit
sqlite3 $(DB) < $(DBSQL)
clean:
${RM} $(OBJ) $(BIN) $(DB)
|