home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-02-17 | 1.0 KB | 49 lines |
- # Makefile for project
-
- # Change this to the main file name (whitout ext)
- # This is also the name of the executable file
- MAIN=
-
- # Add .o files for all other sourcefiles after $(MAIN).o
- # Ex) if graphics.c is one subpart of the project:
- # OBJFILES=lib:c.o $(MAIN).o graphics.o
- OBJFILES=lib:c.o $(MAIN).o
-
- # Default linker-libraries
- # add lib:scm.lib before lib:sc.lib if using math..
- LINKLIBS=lib:sc.lib lib:amiga.lib
-
- # C-compiler
- CC=SC
- CFLAGS =
-
- # Assembler
- ASM=asm
- AFLAGS= -iinclude:
-
- # Linker
- LINK=slink
-
- #Default rules
- # C source files (.c -> .o)
- .c.o:
- $(CC) $(CFLAGS) $*.c
- # ASM source files ( .a .s .asm -> .o)
- .a.o:
- $(ASM) $(AFLAGS) -o$*.o $*.a
- .s.o:
- $(ASM) $(AFLAGS) -o$*.o $*.s
- .asm.o:
- $(ASM) $(AFLAGS) -o$*.o $*.asm
-
- # Use defaultrules for compiling... then link
- $(MAIN): $(OBJFILES)
- $(LINK) $(OBJFILES) TO $(MAIN) LIB $(LINKLIBS)
-
- #Special rules:
- #destination: dependency-files
- # compile-command(s)
- #Ex (sound.c -> sound.o, recompile if sound.c or sound.h is changed)
- #sound.o: sound.c sound.h
- # $(CC) $(CFLAGS) -y -b0 sound.c
-