CROSS_COMPILE ?= arm-linux-gnueabi- CC = $(CROSS_COMPILE)gcc OBJS = sched_task # -static needed for cross building for old EGLIBC on newer GLIBC # Example: Building for Rinato (Eglibc-2.13) on Glibc-2.19 CFLAGS = -static-libgcc -static # -lrt for clock_gettime when Glibc < 2.17 LDFLAGS = -lrt all: $(OBJS) %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ $(LDFLAGS) % : %.c $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) clean: rm -f *.o rm -f $(OBJS)