1 CC = $(CROSS_COMPILE)gcc 2 CFLAGS = -O2 -Wall 3 CFLAGS += -DCONFIG_LIBNL20 -I$(NFSROOT)/usr/include -I$(NFSROOT)/include 4 5 LDFLAGS += -L$(NFSROOT)/lib 6 LIBS += -lnl -lnl-genl -lm 7 8 OBJS = nvs.o misc_cmds.o calibrator.o plt.o ini.o 9 10 %.o: %.c calibrator.h nl80211.h plt.h nvs_dual_band.h 11 $(CC) $(CFLAGS) -c -o $@ $< 12 13 all: $(OBJS) 14 $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o calibrator 15 16 uim: 17 $(CC) $(CFLAGS) $(LDFLAGS) uim_rfkill/$@.c -o $@ 18 19 static: $(OBJS) 20 $(CC) $(LDFLAGS) --static $(OBJS) $(LIBS) -o calibrator 21 22 install: 23 @echo Copy files to $(NFSROOT)/home/root 24 @cp -f ./calibrator $(NFSROOT)/home/root 25 @cp -f ./scripts/go.sh $(NFSROOT)/home/root 26 27 clean: 28 @rm -f *.o calibrator uim 29