You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
389 B

LIB_STATIC=libc99.a
LIB_DYN=libc99.so
CFLAGS+=-std=c99 -g -UNDEBUG
SRCS+=$(wildcard *.c)
OBJS_C+=$(SRCS:.c=.o)
.PHONY: all lib_static lib_dyn clean
all: lib_static lib_dyn
lib_static: $(LIB_STATIC)
lib_dyn: $(LIB_DYN)
$(LIB_STATIC): $(OBJS_C)
$(AR) -rc $@ $^
$(LIB_DYN): $(OBJS_C)
$(CC) $(CFLAGS) -shared -o $@ $^
clean:
rm -f $(LIB_STATIC)
rm -f $(LIB_DYN)
rm -f $(OBJS_C)