Commit 126b0141 authored by Joanne Hugé's avatar Joanne Hugé

Add arm executable for server side

parent 84ff303b
ARM_CC = arm-linux-gnueabihf-gcc
ARM_PROG = main_arm
PROG = main
SRCDIR = ../src
SRCS = main.c
SRCS = main.c
OBJS = $(SRCS:%.c=%.o)
DEPS = $(SRCS:%.c=%.d)
CFLAGS = -O1 -g -Wall -Werror -Wextra
CFLAGS = -O1 -g -Wall -Werror -Wextra
CFLAGS += -MD -MP
CFLAGS += -I $(SRCDIR)
CFLAGS += -std=gnu99
vpath %.c $(SRCDIR)
$(ARM_PROG): FORCE
make clean
make -e CC:=arm-linux-gnueabihf-gcc $(PROG)
mv $(PROG) $(ARM_PROG)
FORCE:
$(PROG): $(OBJS)
$(CC) $(LDFLAGS) $^ -o $@
-include $(DEPS)
-include $(subst .c,.d,$(SRCS))
run: $(PROG)
./$^
clean:
$(RM) $(PROG) $(OBJS) $(DEPS)
$(RM) $(OBJS) $(PROG) $(subst .c,.d,$(SRCS))
.PHONY: clean, run
.PHONY: clean FORCE
......@@ -21,7 +21,7 @@ static void *get_in_addr(struct sockaddr *sa) {
int main() {
int status;
int sockfd;
int sockfd = 0;
struct addrinfo hints, *servinfo, *servinfo_it;
int bytes_received = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment