File: makeprj.wm5

package info (click to toggle)
libwildmagic 5.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 89,572 kB
  • ctags: 26,264
  • sloc: cpp: 210,924; csh: 637; sh: 95; makefile: 36
file content (53 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
CFG ?= Debug

CC := /usr/bin/g++
CFLAGS += -c -D__LINUX__

ifeq (Debug,$(findstring Debug,$(CFG)))
CFLAGS += -g -D_DEBUG
else
CFLAGS += -O2 -DNDEBUG
endif

LIBPATH := ../../SDK/Library/$(CFG)

ifeq (Dynamic,$(findstring Dynamic,$(CFG)))
SOVER = 5
RELVER = $(SOVER).13
CFLAGS += -fPIC
AR := $(CC)
ARFLAGS := $(LDFLAGS) -L $(LIBPATH) -shared -fPIC -Wl,-soname,libWm5Imagics.so.$(SOVER) -lWm5Core -lWm5Mathematics -o
LIB := $(LIBPATH)/libWm5Imagics.so.$(RELVER)
else
AR := /usr/bin/ar
ARFLAGS := rs
LIB := $(LIBPATH)/libWm5Imagics.a
endif

INCPATH := \
    -I ../. \
    -I ../BinaryOperations \
    -I ../Extraction \
    -I ../Filters \
    -I ../Images \
    -I ../RasterDrawing \
    -I ../Segmenters \
    -I ../../SDK/Include
INCDIR := ../../SDK/Include
INC := $(wildcard Wm5*.h) $(wildcard Wm5*.inl)
INC := $(notdir $(INC))
SRC := $(wildcard Wm5*.cpp)
SRC := $(notdir $(SRC))
OBJDIR := ../$(CFG)
OBJ := $(SRC:%.cpp=$(OBJDIR)/%.o)

build : $(OBJ)
	$(AR) $(ARFLAGS) $(LIB) $(OBJDIR)/*.o
	cp -fp $(INC) $(INCDIR)

$(OBJDIR)/%.o : %.cpp
	$(CC) $(INCPATH) $(CFLAGS) $< -o $@

clean :
	rm -rf $(LIB)
	rm -rf $(OBJDIR)