35 lines
798 B
Makefile
35 lines
798 B
Makefile
ARCH = x86
|
|
NEWLIB = ../$(ARCH)/$(TARGET)
|
|
MAKE = make
|
|
STRIP_DEBUG = --strip-debug
|
|
KEEP_DEBUG = --only-keep-debug
|
|
LDFLAGS =
|
|
LIBNAME = libsocket.a
|
|
ARFLAGS = ruv
|
|
CP = cp
|
|
OBJS = accept.o bind.o closesocket.o connect.o listen.o recv.o send.o socket.o ip_addr.o #gethostbyname.o setsockopt.o getsockopt.o sendto.o select.o
|
|
|
|
# other implicit rules
|
|
%.o : %.c
|
|
$(CC_FOR_TARGET) -c $(CFLAGS) -o $@ $<
|
|
|
|
default: all
|
|
|
|
all: $(LIBNAME)
|
|
|
|
$(LIBNAME): $(OBJS) socket.h
|
|
$(AR_FOR_TARGET) $(ARFLAGS) $@ $(OBJS)
|
|
$(CP) $@ $(NEWLIB)/lib
|
|
$(CP) socket.h $(NEWLIB)/include/sys
|
|
$(CP) in.h $(NEWLIB)/include/netinet
|
|
$(CP) inet.h $(NEWLIB)/include/arpa
|
|
$(CP) netdb.h $(NEWLIB)/include
|
|
|
|
clean:
|
|
$(RM) $(LIBNAME) *.o *~
|
|
|
|
depend:
|
|
$(CC_FOR_TARGET) -MM $(CFLAGS) *.c > Makefile.dep
|
|
|
|
-include Makefile.dep
|
|
# DO NOT DELETE
|