-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
39 lines (28 loc) · 1019 Bytes
/
Makefile
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
###############################################################################
.SUFFIXES: .o .cpp
OBJECTS_FBE=fbexport/ParseArgs.o fbexport/FBExport.o fbexport/cli-main.o
OBJECTS_FBC=fbcopy/args.o fbcopy/fbcopy.o fbcopy/TableDependency.o fbcopy/main.o
# Compiler & linker flags
COMPILE_FLAGS=-O2 -DIBPP_LINUX -DIBPP_GCC -Iibpp -W -Wall -fPIC
LINK_FLAGS=-pthread -lfbclient
#COMPILE_FLAGS=-O1 -DIBPP_WINDOWS -DIBPP_GCC -Iibpp
#LINK_FLAGS=
all: exe/fbcopy exe/fbexport
exe/fbexport: $(OBJECTS_FBE) ibpp/all_in_one.o
g++ ibpp/all_in_one.o $(OBJECTS_FBE) -oexe/fbexport $(LINK_FLAGS)
exe/fbcopy: $(OBJECTS_FBC) ibpp/all_in_one.o
g++ ibpp/all_in_one.o $(OBJECTS_FBC) -oexe/fbcopy $(LINK_FLAGS)
# Linux only
# FB2.x: g++ -pthread -lfbclient $(OBJECTS) -o$(EXENAME)
install:
install exe/fbcopy /usr/bin/fbcopy
install exe/fbexport /usr/bin/fbexport
.cpp.o:
g++ -c $(COMPILE_FLAGS) -o $@ $<
clean:
rm -f fbcopy/*.o
rm -f ibpp/all_in_one.o
rm -f exe/fbcopy*
rm -f fbexport/*.o
rm -f exe/fbexport*
#EOF