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