summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 17097e37f3d8496cdcf340a44cbd395068a380d4 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ident "$Id$"
## -----------------------------------------------------------------------
##   
##   Copyright 2002 H. Peter Anvin - All Rights Reserved
##
##   This program is free software; you can redistribute it and/or modify
##   it under the terms of the GNU General Public License as published by
##   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
##   USA; either version 2 of the License, or (at your option) any later
##   version; incorporated herein by reference.
##
## -----------------------------------------------------------------------

#
# Makefile for genfatimage
#

CC 	= gcc
CFLAGS	= -g -O -Wall -D_FILE_OFFSET_BITS=64 $(SYSLXFLAGS)
LDFLAGS = -g
LIBS    = 
PERL    = perl

OBJS =	alloc.o dirtree.o main.o xmalloc.o xstdio.o genfat.o \
	clustparm.o writedir.o writefile.o writechain.o writefs.o \
	gensuper.o date.o syslinux.o getgeo.o cp437.o
SRCS =	alloc.c dirtree.c main.c xmalloc.c xstdio.c genfat.c \
	clustparm.c writedir.c writefile.c writechain.c writefs.c \
	gensuper.c date.c syslinux.c getgeo.c

# Enable this to compile with SYSLINUX support
SYSLXDIR   = ../syslinux
SYSLXLIB   = $(SYSLXDIR)/libsyslinux.a
SYSLXFLAGS = -I$(SYSLXDIR) -DWITH_SYSLINUX

.SUFFIXES: .c .o .asm .bin .lst

all:	genfatimage getgeo

.c.o:
	$(CC) $(CFLAGS) -c $<

genfatimage: $(OBJS) $(SYSLXLIB)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(SYSLXLIB) $(LIBS)

getgeo: getgeo.c
	$(CC) $(CFLAGS) $(LDFLAGS) -DSTANDALONE -o $@ $< $(LIBS)

cp437.c: CP437.TXT unitbl.pl
	$(PERL) unitbl.pl < CP437.TXT > $@ || rm -f $@

clean:
	rm -f *.o genfatimage getgeo

spotless: clean
	rm -f *~ \#* core