aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules/Makefile
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-01 01:30:07 +0000
committerhpa <hpa>2004-12-01 01:30:07 +0000
commit01c67843bd343499406dd79c7ab8660bcc4b33c6 (patch)
tree50d2fcd0c89177a8782b8ac09a0042019692900e /com32/modules/Makefile
parent7c4d8375a05ffaf58e1b6b5789758a2fcfeb3b87 (diff)
downloadsyslinux-01c67843bd343499406dd79c7ab8660bcc4b33c6.tar.gz
syslinux-01c67843bd343499406dd79c7ab8660bcc4b33c6.tar.xz
syslinux-01c67843bd343499406dd79c7ab8660bcc4b33c6.zip
Utility library which can be compiled either for Linux or for COM32
Diffstat (limited to 'com32/modules/Makefile')
-rw-r--r--com32/modules/Makefile31
1 files changed, 21 insertions, 10 deletions
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index ed4e386d..f02a5143 100644
--- a/com32/modules/Makefile
+++ b/com32/modules/Makefile
@@ -25,14 +25,17 @@ LD = ld -m elf_i386
AR = ar
NASM = nasm
RANLIB = ranlib
-CFLAGS = -W -Wall -march=i386 -Os -fomit-frame-pointer -I../include -D__COM32__
-LNXCFLAGS = -W -Wall -march=i386 -Os -g
-SFLAGS = -march=i386
+CFLAGS = -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__
+LNXCFLAGS = -W -Wall -march=i386 -Os -g -I../libutil/include
+LNXSFLAGS = -march=i386
+LNXLDFLAGS = -g
+SFLAGS = -D__COM32__ -march=i386
LDFLAGS = -T ../lib/com32.ld
OBJCOPY = objcopy
PPMTOLSS16 = ../ppmtolss16
-LIB = ../lib/libcom32.a
LIBGCC := $(shell $(CC) --print-libgcc)
+LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC)
+LNXLIBS = ../libutil/libutil_lnx.a
.SUFFIXES: .lss .c .o .elf .c32 .lnx
@@ -47,21 +50,29 @@ all: hello.c32 fancyhello.c32 fancyhello.lnx
$(CC) $(CFLAGS) -c -o $@ $<
.PRECIOUS: %.elf
-%.elf: %.o $(LIB)
- $(LD) $(LDFLAGS) -o $@ $^ $(LIBGCC)
+%.elf: %.o $(LIBS)
+ $(LD) $(LDFLAGS) -o $@ $^
+
+.PRECIOUS: %.lo
+%.lo: %.S
+ $(CC) $(LNXSFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.lo
+%.lo: %.c
+ $(CC) $(LNXCFLAGS) -c -o $@ $<
.PRECIOUS: %.lnx
-%.lnx: %.c
- $(CC) $(LNXCFLAGS) -o $@ $^
+%.lnx: %.lo $(LNXLIBS)
+ $(CC) $(LNXLDFLAGS) -o $@ $^
%.c32: %.elf
$(OBJCOPY) -O binary $< $@
tidy:
- rm -f *.o *.a *.lst *.elf
+ rm -f *.o *.lo *.a *.lst *.elf
clean: tidy
- rm -f *.lss *.o *.c32 *.lnx *.com
+ rm -f *.lss *.c32 *.lnx *.com
spotless: clean
rm -f *~ \#*