Makefile 766 Bytes
Newer Older
1 2 3 4

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

5
CFLAGS += -Itools
6

7
OBJ-y += $A/unix-startup.o \
8
	$A/main-loop.o \
9
	$A/unix-io.o \
10
	$A/unix-conf.o \
11
	lib/cmdline.o \
12
	lib/conf.o \
13
	lib/libc-functions.o \
14
	lib/dump-funcs.o \
15
	lib/drop.o \
16
	lib/assert.o \
17
	lib/div64.o
18

19 20 21 22 23 24
# 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
25
ifneq ($(TIME),unix)
26
include time-unix/Makefile
27
endif
28
CFLAGS += -Itime-unix -Iproto-standard
29

30 31 32
all: $(TARGET)

# to build the target, we need -lstd again, in case we call functions that
33
# were not selected yet (e.g., pp_init_globals() ).
34 35
$(TARGET): $(TARGET).o
	$(CC) -Wl,-Map,$(TARGET).map2 -o $@ $(TARGET).o -lrt
36