-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 893 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (30 loc) · 893 Bytes
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
# Eye metamod plugin Makefile for linux and win32 (mingw)
ARCH = $(shell uname -m)
CFLAGS = -O3 -Wall -funsafe-loop-optimizations -funsafe-math-optimizations \
-fomit-frame-pointer -fno-exceptions -ffast-math \
-Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -Dstrcmpi=strcasecmp
LDFLAGS = -lm -ldl -shared -Wl,--no-undefined
LIBEXT = so
# Force 32 bit build on x86_64 architecture
ifeq ($(ARCH), x86_64)
ARCH = i686
LDFLAGS += -m32
CFLAGS += -march=i686 -m32
DLLNAME = eye_mm_$(ARCH).$(LIBEXT)
endif
INCLUDE = -Isrc/include/metamod \
-Isrc/include/engine \
-Isrc/include/common \
-Isrc/include/dlls \
-Isrc/include/pm_shared
OBJ = src/sdk_util.o \
src/meta_api.o \
src/dllapi.o
DOCC = $(CXX) $(CFLAGS) $(INCLUDE) -o $@ -c $<
DOO = $(CXX) -o $@ $(OBJ) $(LDFLAGS)
$(DLLNAME) : $(OBJ)
$(DOO)
clean:
rm -f $(OBJ) $(DLLNAME)
./%.o: ./%.cpp
$(DOCC)