Initial commit
[amiga/BoopsiListView.git] / GNUmakefile
1 ##
2 ##      $VER: LVDemo_Makefile 2.1 (5.9.97)
3 ##
4 ##      Copyright (C) 1996,97 by Bernardo Innocenti
5 ##
6 ##      Makefile for GCC
7 ##
8
9 ###########################################################
10 # Name of the main executable
11 ###########################################################
12 #
13 PROJ = LVDemo
14
15
16 ###########################################################
17 # Package configuration
18 ###########################################################
19 #
20
21 # set to OS30_ONLY to leave out support for old V37
22 # set to ANY_OS to make an executable for V37 with V39 support
23 #
24 OSVER = ANY_OS
25
26 # cpu to compile for.
27 #
28 CPU = 68020
29
30
31 ###########################################################
32 # Object files in this project
33 ###########################################################
34 #
35 OBJS = startup_gcc.o LVDemo.o ListViewHooks.o \
36  ListViewClass.o ListBoxClass.o ScrollButtonClass.o
37
38
39 ###########################################################
40 # Make the project
41 ###########################################################
42 #
43 all: $(PROJ)
44
45
46 ###########################################################
47 # Remove all targets and intermediate files
48 ###########################################################
49 #
50 clean:
51         -Delete $(PROJ) $(OBJS)
52
53
54 ###########################################################
55 # Dependences
56 ###########################################################
57 #
58 LVDemo.c ListViewClass.c: ListViewClass.h
59
60
61 ###########################################################
62 # GCC Release version should be compiled with these flags
63 ###########################################################
64 #
65 CC = gcc
66 CFLAGS = -c -O0 -finline-functions -fno-implement-inlines \
67  -m$(CPU) -msmall-code -mregparm -fomit-frame-pointer \
68  -I/gg/include -I/include -Wunused -Wreturn-type -D$(OSVER)
69 LFLAGS = -s
70 LIBS = -noixemul -nostdlib
71
72
73 ###########################################################
74 # GCC - Make the executable
75 ###########################################################
76 #
77
78 # Assemble startup code
79 #
80 startup_gcc.o: startup_gcc.s
81         $(AS) startup_gcc.s -o startup_gcc.o
82
83 # Compile C sources and make the object files
84 #
85 .c.o: PIPClass.h
86         $(CC) $(*).c $(CFLAGS)
87
88 # Link object files and make the executable
89 #
90 $(PROJ): $(OBJS)
91         $(CC) $(OBJS) -o $(PROJ) $(LFLAGS) $(LIBS)
92         @Protect $(PROJ) +e