Skip to content

Commit

Permalink
adding source files and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Feb 17, 2012
1 parent b82b2d8 commit 2f9d92d
Show file tree
Hide file tree
Showing 5 changed files with 887 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*.o
/*.do
/*.a
39 changes: 39 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
SRCS = utf8.c

OBJS = $(SRCS:%.c=%.o)
DOBJS = $(SRCS:%.c=%.do)

ifneq ($(MAKECMDGOALS),debug)
XOBJS = $(OBJS)
else
XOBJS = $(DOBJS)
endif

FLAGS = -Wall -Wno-strict-aliasing $(CFLAGS)

DEBUGFLAGS = -ggdb3 -DDEBUG
SHIPFLAGS = -O3 -DNDEBUG -falign-functions -momit-leaf-frame-pointer

DEBUGFLAGS += $(FLAGS)
SHIPFLAGS += $(FLAGS)

default: release

%.o: %.c
$(CC) $(SHIPFLAGS) -c $< -o $@
%.do: %.c
$(CC) $(DEBUGFLAGS) -c $< -o $@

release debug: libcutef8.a

libcutef8.a: $(XOBJS)
rm -rf $@
ar -rcs $@ $^

clean:
rm -f *.o
rm -f *.do
rm -f *.a
rm -f *~ *#
rm -f core*
rm -f libcutef8.a
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Simple, fast C library for manipulating strings in the UTF-8 encoding.
Loading

0 comments on commit 2f9d92d

Please sign in to comment.