forked from yedf2/handy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yedf
committed
Jun 15, 2015
1 parent
1f95f0e
commit 6f432a6
Showing
14 changed files
with
89 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,50 @@ | ||
# OPT ?= -O2 -DNDEBUG | ||
# (B) Debug mode, w/ full line-level debugging symbols | ||
OPT ?= -g2 | ||
# (C) Profiling mode: opt, but w/debugging symbols | ||
# OPT ?= -O2 -g2 -DNDEBUG | ||
$(shell ./build_config 1>&2) | ||
include config.mk | ||
default clean: | ||
cd handy && make $@ || exit 1 | ||
|
||
CFLAGS += -I. -I./include $(PLATFORM_CCFLAGS) $(OPT) | ||
CXXFLAGS += -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) | ||
|
||
LDFLAGS += $(PLATFORM_LDFLAGS) | ||
LIBS += $(PLATFORM_LIBS) | ||
|
||
HANDY_SOURCES += $(shell find handy -name '*.cc') | ||
HANDY_OBJECTS = $(HANDY_SOURCES:.cc=.o) | ||
|
||
TEST_SOURCES = $(shell find test -name '*.cc') | ||
TEST_OBJECTS = $(TEST_SOURCES:.cc=.o) | ||
|
||
EXAMPLE_SOURCES += $(shell find examples -name '*.cc') | ||
EXAMPLES = $(EXAMPLE_SOURCES:.cc=) | ||
|
||
LIBRARY = libhandy.a | ||
|
||
TARGETS = $(LIBRARY) handy_test $(EXAMPLES) | ||
|
||
default: $(TARGETS) | ||
handy_examples: $(EXAMPLES) | ||
$(EXAMPLES): $(LIBRARY) | ||
|
||
clean: | ||
-rm -f $(TARGETS) | ||
-rm -f */*.o | ||
|
||
$(LIBRARY): $(HANDY_OBJECTS) | ||
rm -f $@ | ||
$(AR) -rs $@ $(HANDY_OBJECTS) | ||
|
||
handy_test: $(TEST_OBJECTS) $(LIBRARY) | ||
$(CXX) $^ -o $@ $(LDFLAGS) $(LIBRARY) $(LIBS) | ||
|
||
.cc.o: | ||
$(CXX) $(CXXFLAGS) -c $< -o $@ | ||
|
||
.c.o: | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
.cc: | ||
$(CXX) -o $@ $< $(CXXFLAGS) $(LDFLAGS) $(LIBRARY) $(LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#pragma once | ||
#include "logging.h" | ||
#include "util.h" | ||
#include "net.h" | ||
#include "threads.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters