File: makeprj.wm5

package info (click to toggle)
libwildmagic 5.13-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 89,572 kB
  • ctags: 26,264
  • sloc: cpp: 210,924; csh: 637; sh: 95; makefile: 36
file content (51 lines) | stat: -rw-r--r-- 1,090 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
CFG ?= Debug

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

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

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

INCPATH := \
    -I ../. \
    -I ../Assert \
    -I ../DataTypes \
    -I ../InputOutput \
    -I ../Memory \
    -I ../ObjectSystems \
    -I ../Threading \
    -I ../Time
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)