From 5a283e5b2b523d53e3504292c386b534dc74386a Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 7 Oct 2011 09:27:04 -0700 Subject: Preliminary work for the Task manager. Added libcoro submodule. Also refactored some pieces of code. --- Makefile | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 58c41bf..79ed4c7 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ AR = ar rcs CPPFLAGS = -O3 ifeq ($(SYSTEM),Darwin) + LIBCORO_CFLAGS = -DCORO_SJLJ ARCH_FLAGS = -arch i386 LIBS = -liconv LD = g++ -arch i386 @@ -27,6 +28,7 @@ ifeq ($(SYSTEM),Darwin) AS = i686-apple-darwin-as -arch i386 endif else + LIBCORO_CFLAGS = -DCORO_ASM ARCH_FLAGS = -march=i686 -m32 ASFLAGS = -march=i686 --32 STRIP = strip --strip-unneeded @@ -34,30 +36,38 @@ else LDFLAGS += -flto -O3 endif -INCLUDES = -Iincludes +INCLUDES = -Iincludes -Ilibcoro -CPPFLAGS_NO_ARCH += $(INCLUDES) -g -DSTDC_HEADERS -fexceptions -DWORDS_LITTLEENDIAN $(HAVES) +CPPFLAGS_NO_ARCH += $(INCLUDES) -g -DSTDC_HEADERS -fexceptions -DWORDS_LITTLEENDIAN $(HAVES) $(LIBCORO_CFLAGS) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) LDFLAGS += $(ARCH_FLAGS) $(LIBS) vpath %.cc src:tests +vpath %.c libcoro BALAU_SOURCES = \ BString.cc \ Local.cc \ Main.cc \ Printer.cc \ +Task.cc \ +TaskMan.cc \ + +LIBCORO_SOURCES = \ +coro.c \ TEST_SOURCES = \ test-String.cc \ +test-Tasks.cc \ LIB = libBalau.a -WHOLE_SOURCES = $(BALAU_SOURCES) $(TEST_SOURCES) +BALAU_OBJECTS = $(addsuffix .o, $(notdir $(basename $(BALAU_SOURCES) $(LIBCORO_SOURCES)))) + +WHOLE_SOURCES = $(BALAU_SOURCES) $(LIBCORO_SOURCES) $(TEST_SOURCES) TESTS = $(notdir $(basename $(TEST_SOURCES))) -BALAU_OBJECTS = $(addsuffix .o, $(notdir $(basename $(BALAU_SOURCES)))) ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES)))) ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES)))) @@ -77,11 +87,17 @@ libBalau.a: $(BALAU_OBJECTS) test-String: test-String.o $(LIB) $(LD) $(LDFLAGS) -o $@ $< ./$(LIB) +test-Tasks: test-Tasks.o $(LIB) + $(LD) $(LDFLAGS) -o $@ $< ./$(LIB) + dep: $(ALL_DEPS) %.dep : %.cc $(CXX) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< +%.dep : %.c + $(CC) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< + -include $(ALL_DEPS) clean: -- cgit v1.2.3