diff options
author | Pixel <pixel@nobis-crew.org> | 2011-10-07 09:27:04 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-10-07 09:28:53 -0700 |
commit | 5a283e5b2b523d53e3504292c386b534dc74386a (patch) | |
tree | 779a2f275fd68db81e5927c6b2c190782e6f11f8 /Makefile | |
parent | ad4fddc454407fe154e87564472332e5c421452a (diff) |
Preliminary work for the Task manager.
Added libcoro submodule.
Also refactored some pieces of code.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -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: |