crashtest-r0ket/firmware/Makefile.util
Rainer Mueller 377d614c38 Fix build on Mac OS X
The header stdio.h on Mac OS X includes some defines to do buffer
overflow checks if using _FORTIFY_SOURCE > 2, which is the default.
Defining _FORTIFY_SOURCE=0 disables this behavior.

The Mac OS X linker ld64 has problem with common symbols in static
archives. The workaround here is to run 'ranlib -c' on the static
archive.
2011-08-01 05:45:16 +02:00

22 lines
369 B
Text

LIBFILE?=lib$(LIBNAME).a
SRCS?= $(foreach mod,$(OBJS),$(subst .o,.c,$(mod)))
DEPFILE?=Makefile.dep
all: $(LIBFILE)
$(LIBFILE): $(OBJS)
$(AR) rcs $@ $(OBJS)
$(RANLIB) $(RANLIBFLAGS) $@
%.o : %.c
$(CC) $(CFLAGS) -o $@ $<
clean::
rm -f $(OBJS) $(LIBFILE) $(CLEANFILES)
depend:
@$(CC) $(CFLAGS) -MM $(SRCS) > Makefile.dep
include $(DEPFILE)
$(DEPFILE): depend