Skip to content

Instantly share code, notes, and snippets.

@wiesmann
Created March 6, 2016 16:47
Show Gist options
  • Save wiesmann/eb481c618e959bdc21b7 to your computer and use it in GitHub Desktop.
Save wiesmann/eb481c618e959bdc21b7 to your computer and use it in GitHub Desktop.
libexword – Mac OS X Makefile
LIB_SOURCES = exword.c \
obex.c \
databuffer.c
LIB_OBJS = $(LIB_SOURCES:.c=.o)
SRCS = main.c dict.c util.c
OBJS = $(SRCS:.c=.o)
LIBS = -lusb-1.0 -liconv -lreadline
CC = clang
INCLUDES = -I/opt/local/include/libusb-1.0/ -I/opt/local/include/ -I /opt/local/include/readline/
LFLAGS = -L/opt/local/lib/
MAIN = exword
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
$(MAIN): $(OBJS) $(LIB_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LIB_OBJS) $(LFLAGS) $(LIBS)
clean:
$(RM) *.o *~ $(MAIN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment