projects
/
satune.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing polarity path bug ....
[satune.git]
/
src
/
Makefile
diff --git
a/src/Makefile
b/src/Makefile
index 431d55b037d997c7f245883d0dc27a052f33429e..e6699e6a02027a1c19696a7eb6d8acff986c585b 100644
(file)
--- a/
src/Makefile
+++ b/
src/Makefile
@@
-4,14
+4,16
@@
PHONY += directories
MKDIR_P = mkdir -p
OBJ_DIR = bin
MKDIR_P = mkdir -p
OBJ_DIR = bin
-C
_SOURCES := $(wildcard *.c) $(wildcard AST/*.c) $(wildcard Collections/*.c) $(wildcard Backend/*.c) $(wildcard Encoders/*.
c)
+C
PP_SOURCES := $(wildcard *.cc) $(wildcard AST/*.cc) $(wildcard ASTTransform/*.cc) $(wildcard Translator/*.cc) $(wildcard ASTAnalyses/*.cc) $(wildcard Tuner/*.cc) $(wildcard Collections/*.cc) $(wildcard Backend/*.cc) $(wildcard Encoders/*.c
c)
-HEADERS := $(wildcard *.h) $(wildcard AST/*.h) $(wildcard Collections/*.h) $(wildcard Backend/*.h) $(wildcard Encoders/*.h)
+C_SOURCES := $(wildcard *.c) $(wildcard AST/*.c) $(wildcard ASTTransform/*.c) $(wildcard Translator/*.c) $(wildcard ASTAnalyses/*.c) $(wildcard Tuner/*.c) $(wildcard Collections/*.c) $(wildcard Backend/*.c) $(wildcard Encoders/*.c)
+
+HEADERS := $(wildcard *.h) $(wildcard AST/*.h) $(wildcard ASTTransform/*.h) $(wildcard Translator/*.h) $(wildcard ASTAnalyses/*.h) $(wildcard Tuner/*.h) $(wildcard Collections/*.h) $(wildcard Backend/*.h) $(wildcard Encoders/*.h)
OBJECTS := $(CPP_SOURCES:%.cc=$(OBJ_DIR)/%.o) $(C_SOURCES:%.c=$(OBJ_DIR)/%.o)
CFLAGS := -Wall -g -O0
OBJECTS := $(CPP_SOURCES:%.cc=$(OBJ_DIR)/%.o) $(C_SOURCES:%.c=$(OBJ_DIR)/%.o)
CFLAGS := -Wall -g -O0
-CFLAGS += -IAST -I
Collections -IBackend -I. -IEncoders
+CFLAGS += -IAST -I
ASTTransform -IASTAnalyses -ITranslator -ICollections -IBackend -I. -IEncoders -ITuner
LDFLAGS := -ldl -lrt -rdynamic
SHARED := -shared
LDFLAGS := -ldl -lrt -rdynamic
SHARED := -shared
@@
-23,13
+25,17
@@
endif
MARKDOWN := ../docs/Markdown/Markdown.pl
MARKDOWN := ../docs/Markdown/Markdown.pl
-all: directories $(LIB_SO)
+all: directories $
{OBJ_DIR}/$
(LIB_SO)
directories: ${OBJ_DIR}
${OBJ_DIR}:
${MKDIR_P} ${OBJ_DIR}
${MKDIR_P} ${OBJ_DIR}/AST
directories: ${OBJ_DIR}
${OBJ_DIR}:
${MKDIR_P} ${OBJ_DIR}
${MKDIR_P} ${OBJ_DIR}/AST
+ ${MKDIR_P} ${OBJ_DIR}/ASTAnalyses
+ ${MKDIR_P} ${OBJ_DIR}/ASTTransform
+ ${MKDIR_P} ${OBJ_DIR}/Translator
+ ${MKDIR_P} ${OBJ_DIR}/Tuner
${MKDIR_P} ${OBJ_DIR}/Collections
${MKDIR_P} ${OBJ_DIR}/Backend
${MKDIR_P} ${OBJ_DIR}/Encoders
${MKDIR_P} ${OBJ_DIR}/Collections
${MKDIR_P} ${OBJ_DIR}/Backend
${MKDIR_P} ${OBJ_DIR}/Encoders
@@
-37,12
+43,18
@@
${OBJ_DIR}:
debug: CFLAGS += -DCONFIG_DEBUG
debug: all
debug: CFLAGS += -DCONFIG_DEBUG
debug: all
+test: all
+ make -C Test
+
PHONY += docs
docs: $(C_SOURCES) $(HEADERS)
doxygen
PHONY += docs
docs: $(C_SOURCES) $(HEADERS)
doxygen
-$(LIB_SO): $(OBJECTS)
- $(CC) -g $(SHARED) -o ${OBJ_DIR}/$(LIB_SO) $+ $(LDFLAGS)
+${OBJ_DIR}/$(LIB_SO): $(OBJECTS)
+ $(CXX) -g $(SHARED) -o ${OBJ_DIR}/$(LIB_SO) $+ $(LDFLAGS)
+
+${OBJ_DIR}/%.o: %.cc
+ $(CXX) -fPIC -c $< -o $@ $(CFLAGS) -Wno-unused-variable
${OBJ_DIR}/%.o: %.c
$(CC) -fPIC -c $< -o $@ $(CFLAGS) -Wno-unused-variable
${OBJ_DIR}/%.o: %.c
$(CC) -fPIC -c $< -o $@ $(CFLAGS) -Wno-unused-variable
@@
-63,10
+75,10
@@
tags:
ctags -R
tabbing:
ctags -R
tabbing:
- uncrustify -c C.cfg --no-backup *.c
+ uncrustify -c C.cfg --no-backup *.c
c */*.cc
uncrustify -c C.cfg --no-backup *.h */*.h
wc:
uncrustify -c C.cfg --no-backup *.h */*.h
wc:
- wc */*.c
*/*.h *.
c *.h
+ wc */*.c
c */*.h *.c
c *.h
.PHONY: $(PHONY)
.PHONY: $(PHONY)