forked from mchome/dogcom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (36 loc) · 764 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
CC = gcc
TARGET = dogcom
INSTALL_DIR = /usr/bin/
ifeq ($(debug), y)
CFLAGS += -DDEBUG -g
endif
ifeq ($(win32), y)
CFLAGS += -lws2_32
# TARGET = dogcom.exe
endif
ifeq ($(static), y)
CFLAGS += -static
endif
ifeq ($(strip), y)
CFLAGS += -Os -s -Wno-unused-result
endif
ifeq ($(force_encrypt), y)
CFLAGS += -DFORCE_ENCRYPT
endif
ifeq ($(test), y)
CFLAGS += -std=gnu99 -Werror -DTEST
else
CFLAGS += -std=gnu99 -Werror
endif
SOURCES = $(wildcard *.c) $(wildcard libs/*.c)
OBJS = $(patsubst %.c, %.o, $(SOURCES))
$(TARGET): $(OBJS)
$(CC) $(DEBUG) $(TEST) $(OBJS) $(CFLAGS) -o $(TARGET)
all: $(TARGET)
install: $(TARGET)
cp $(TARGET) $(INSTALL_DIR)
clean:
rm -f $(OBJS)
rm -f $(TARGET)
distclean: clean
.PHONY: all clean distclean install