avra: optimize makefile

git-svn-id: svn://kolibrios.org@8362 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Serhii Sakhno 2020-12-10 21:10:38 +00:00
parent 9cee2a7ef5
commit 7c5089302e
1 changed files with 8 additions and 16 deletions

View File

@ -1,3 +1,6 @@
CC = kos32-gcc
LD = kos32-ld
SDK_DIR:= $(abspath ../../../sdk)
LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds --image-base 0
@ -7,14 +10,12 @@ CFLAGS = -c -fno-ident -Wall -O3 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WI
INCLUDES= -I $(SDK_DIR)/sources/newlib/libc/include
LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
CC = kos32-gcc $(CFLAGS) $(INCLUDES)
LD = kos32-ld
SOURCES = avra.c device.c parser.c expr.c mnemonic.c directiv.c macro.c file.c map.c coff.c
SOURCES = avra.c device.c parser.c expr.c mnemonic.c directiv.c \
macro.c file.c map.c coff.c args.c stdextra.c
OBJECTS = $(SOURCES:.c=.o)
OBJ_ALL = $(OBJECTS) args.o stdextra.o
OBJ_ALL = $(OBJECTS)
#********************************************************************
@ -24,17 +25,8 @@ avra: $(OBJ_ALL)
$(LD) $(OBJ_ALL) $(LDFLAGS) $(LIBPATH) -o avra -lgcc -lc.dll
objcopy avra -O binary
args.o: args.c misc.h args.h
avra.o: avra.c misc.h args.h avra.h device.h
device.o: device.c misc.h avra.h device.h
directiv.o: directiv.c misc.h args.h avra.h device.h
expr.o: expr.c misc.h avra.h
file.o: file.c misc.h avra.h
macro.o: macro.c misc.h args.h avra.h
mnemonic.o: mnemonic.c misc.h avra.h device.h
parser.o: parser.c misc.h avra.h
stdextra.o: stdextra.c misc.h
coff.o: coff.c coff.h
%.o : %.c Makefile
$(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $<
clean:
rm -f avra *.o *.p *~