Makefile 521 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

# Compile with slower (but safer) block transfer code
SAFEMODE = 1

TARGET = Lib/libZestSC1.a
ARFLAGS = r

OBJS = Main.o Error.o Data.o Config.o
ifdef SAFEMODE
#   OBJS += DataMac.o
# else
  OBJS += DataLinux.o
endif

CC = gcc


ifdef SAFEMODE
# Debugging values:
  CFLAGS = -c -fPIC -g -O0 -W -Wall -fno-inline -I../Inc -m32
else
# Production values:
  CFLAGS = -c -O2 -W -Wall -I../Inc -m32
endif

all: $(TARGET)

clean:
	rm $(TARGET)
	rm $(OBJS)

$(TARGET): $(OBJS)
33
	mkdir -p Lib
34
35
	$(AR) $(ARFLAGS) $(TARGET) $(OBJS)