RetroArch/libretro-common/net/Makefile

45 lines
824 B
Makefile
Raw Normal View History

2016-03-02 23:17:04 +00:00
TARGETS = http_test net_ifinfo
INCFLAGS = -I../include -I../include/net
2015-10-15 14:04:26 +00:00
SOURCES := $(wildcard *.c) \
../compat/compat.c
OBJS := $(SOURCES:.c=.o)
2016-03-02 23:17:04 +00:00
ifeq ($(DEBUG),1)
CFLAGS += -O0 -g
else
CFLAGS += -O2
endif
CFLAGS += -Wall -pedantic -std=gnu99
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
HTTP_TEST_C = \
net_http.c \
net_http_test.c \
net_compat.c \
../compat/compat_strl.c
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
HTTP_TEST_OBJS := $(HTTP_TEST_C:.c=.o)
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
NET_IFINFO_C = \
net_ifinfo.c \
net_ifinfo_test.c
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
NET_IFINFO_OBJS := $(NET_IFINFO_C:.c=.o)
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
.PHONY: all clean
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
all: $(TARGETS)
%.o: %.c
$(CC) $(INCFLAGS) $< -c $(CFLAGS) -o $@
http_test: $(HTTP_TEST_OBJS)
$(CC) $(INCFLAGS) $(HTTP_TEST_OBJS) $(CFLAGS) -o $@
net_ifinfo: $(NET_IFINFO_OBJS)
$(CC) $(INCFLAGS) $(NET_IFINFO_OBJS) $(CFLAGS) -o $@
clean:
rm -rf $(TARGETS) $(HTTP_TEST_OBJS) $(NET_IFINFO_OBJS)