| CFILES=\ |
| diskpart.c elf64.c load.c paloio.c \ |
| elf32.c error.c palo.c |
| |
| OFILES=$(CFILES:.c=.o) |
| |
| |
| INCLUDES=common.h load.h palo.h |
| |
| ###############{ |
| |
| OS := $(shell uname -s) |
| CC=gcc |
| ifeq ($(strip ${OS}),HP-UX) |
| CFLAGS=-g -O -I../include -I../lib -I$(PA)/include |
| else |
| CFLAGS=-g -O -I../include -I../lib |
| endif |
| |
| # LDFLAGS=-Wl,-Bstatic |
| LDFLAGS= |
| |
| OFILES2=mkbootable.o elf64.o load.o paloio.o elf32.o error.o |
| |
| # Source sharing with ipl |
| VPATH=../lib:. |
| |
| all: palo mkbootable |
| |
| palo: palo.a |
| echo "char *bld_info = \"`whoami`@`hostname` `date`\";" > build.c |
| $(CC) $(CFLAGS) -c -o build.o build.c |
| -rm -f build.c |
| $(CC) $(CFLAGS) $(LDFLAGS) -o palo palo.a build.o |
| |
| palo.a: $(OFILES) |
| ar rv palo.a $? |
| |
| mkbootable: $(OFILES2) |
| $(CC) $(CFLAGS) $(LDFLAGS) -o mkbootable $(OFILES2) |
| |
| clean: |
| rm -f palo mkbootable *.a *.o usage.h |
| |
| distclean: clean |
| |
| usage.h: usage.txt |
| sed 's/.*/"&\\n"/' < usage.txt > usage.h |
| |
| ###############} |
| |
| diskpart.o : common.h |
| |
| elf32.o \ |
| elf64.o \ |
| load.o : common.h load.h |
| |
| som.o : common.h load.h |
| |
| palo.o : load.h palo.h |
| |
| paloio.o : palo.h |
| |
| error.o: usage.h error.c |