Files
peterj.nikhef.nl 58186dc995 Reverse merged revision(s) 1196-1195 from CLBv2/trunk/sw/embedded/WRPC-v2.1:
re-commit (effectively revert sw/embedded/WRPC-v2.1 back to version 1194)
2015-02-04 13:32:29 +00:00

39 lines
787 B
Makefile

# All files are under A (short for ARCH): I'm lazy
A := arch-$(ARCH)
CFLAGS += -Itools
LIBARCH := $A/libarch.a
OBJ-libarch := $A/unix-startup.o \
$A/main-loop.o \
$A/unix-io.o \
lib/cmdline.o \
lib/conf.o \
lib/libc-functions.o \
lib/dump-funcs.o \
lib/div64.o
# The user can set TIME=, but we pick unix time by default
TIME ?= unix
include time-$(TIME)/Makefile
# Unix time operations are always included as a fallback
include time-unix/Makefile
CFLAGS += -Itime-unix
$(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_globals() ).
$(TARGET): $(TARGET).o $(LIBARCH)
$(CC) -Wl,-Map,$(TARGET).map2 -o $@ $(TARGET).o \
-L$A -larch -L$D -lstd -lrt