blob: 3b441b132a3aed65765c8a617379f3350ad3087d [file] [log] [blame] [edit]
CC = gcc
CFLAGS = -Wall -g
NLLIBNAME = libnl-1
WLAN_API = WLAN_API_NL80211
WLAN_API_SRCS = nl80211.c
SRCS = os.c $(WLAN_API_SRCS) libtcmd.c
OBJS = $(SRCS:.c=.o)
override LDLIBS += $(shell pkg-config --libs $(NLLIBNAME)) -lrt
override CFLAGS += $(shell pkg-config --cflags $(NLLIBNAME)) -D$(WLAN_API)
libtcmd.a: $(SRCS) $(OBJS)
$(AR) rcs $@ $(OBJS)
$(OBJS): $(SRCS)
$(CC) $(CFLAGS) -c $(@:.o=.c) -o $@ $(LDLIBS)
clean:
rm -f *.a *.o