Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile « test - github.com/lexborisov/Modest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b7dc66dfdfe1a18a2a32e42cc0d6d29986e1783d (plain)
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
TARGET := test
SRCDIR := test

CC ?= gcc
LIBS := ../lib/libmodest_static.a
LDLIBS := $(LIBS)

INCLUDE_TMP := include

MODEST_OPTIMIZATION_LEVEL ?= -O2

CFLAGS ?= -Wall -Werror
CFLAGS += $(MODEST_OPTIMIZATION_LEVEL) -Wno-unused-variable -fPIC --std=c99 -I../include

MODEST_BUILD_WITHOUT_THREADS ?= NO
ifeq ($(MODEST_BUILD_WITHOUT_THREADS),YES)
    $(info Build Tests without POSIX Threads)
else
    $(info Build Examples with POSIX Threads)
	CFLAGS += -pthread
endif

ifeq ($(OS),Windows_NT)
else
	UNAM := $(shell uname -s)
	ifeq ($(UNAM),Darwin)
	else
		CFLAGS += -D_POSIX_C_SOURCE=199309L
	endif
endif

find_files_h = $(wildcard $(dir)/*.h)
find_files_c = $(wildcard $(dir)/*.c)

SUBDIRS := mycss myhtml myhtml/utils 
HDRS += $(foreach dir,$(SUBDIRS),$(find_files_h))
SRCS += $(foreach dir,$(SUBDIRS),$(find_files_c))
#SRCS_FN += $(foreach dir,$(SUBDIRS),$(notdir $(find_files_c)))

OBJS := $(patsubst %.c,%,$(SRCS))
#OBJS_RM := $(patsubst %.c,%,$(SRCS_FN))

all: $(TARGET)

$(TARGET): $(OBJS)

clean:
	rm -f $(OBJS)

.PHONY: all