Makefile 511 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

# 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:
20
  CFLAGS = -c -fPIC -g -O0 -W -Wall -fno-inline -I../Inc
21 22
else
# Production values:
23
  CFLAGS = -c -O2 -W -Wall -I../Inc
24 25 26 27 28 29 30 31 32
endif

all: $(TARGET)

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

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