forked from FWGS/xash3d-fwgs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
52 lines (38 loc) · 791 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
40
41
42
43
44
45
46
47
48
49
50
51
52
# Makefile for mdldec
# Copyright (c) nekonomicon 2020
MODULE = mdldec
CC ?= gcc
CFLAGS ?= -O3 -pipe -DHAVE_TGMATH_H -DSTDINT_H=\<stdint.h\>
LDFLAGS ?= -Wl,--no-undefined
SYS = $(shell $(CC) -dumpmachine)
ifneq (, $(findstring mingw, $(SYS)))
EXT = .exe
else
EXT =
endif
APP = $(MODULE)$(EXT)
SRC = mdldec.c \
qc.c \
smd.c \
texture.c \
utils.c \
../../public/xash3d_mathlib.c \
../../public/matrixlib.c \
../../public/crtlib.c
INCLUDE = -I. \
-I../../common \
-I../../engine \
-I../../engine/common \
-I../../engine/common/imagelib \
-I../../public
LIBS = -lm
OBJS = $(SRC:%.c=%.o)
all: $(APP)
$(APP): $(OBJS)
$(CC) $(LDFLAGS) -o $(APP) $(OBJS) $(LIBS)
.c.o:
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
.PHONY: all clean
clean:
$(RM) $(OBJS)
$(RM) $(APP)