Makefile 577 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
# Alessandro Rubini for CERN, 2011 -- public domain

# All files are under A (short for ARCH): I'm lazy
A := arch-$(ARCH)

LIBARCH := $A/libarch.a

OBJ-libarch := $A/posix-startup.o \
	$A/main-loop.o \
	$A/posix-socket.o \
11 12
	$A/posix-io.o \
	$A/posix-timer.o \
13
	lib/div64.o
14 15 16 17 18 19 20 21 22 23

$(LIBARCH): $(OBJ-libarch)
	$(AR) r $@ $^

all: $(TARGET)

# to build the target, we need -lstd again, in case we call functions that
# were not selected yet (e.g., pp_open_instance() ).
$(TARGET): $(TARGET).o $(LIBARCH)
	$(CC) -Wl,-Map,$(TARGET).map2 -o $@ $(TARGET).o \
24
		-L$A -larch -L$D -lstd -lrt
25