summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/pcmcia/Makefile
blob: 6b8bf0cb859be2e9c7031d1e2cb9754384a45c3a (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
 #******************************************************************************
 #
 # Guillaume Cottenceau (gc)
 #
 # Copyright 2001 Mandriva
 #
 # This software may be freely redistributed under the terms of the GNU
 # public license.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #
 #*****************************************************************************

# startup.c is based on pcmcia-socket-startup from pcmciautils-013

top_dir = ..

include $(top_dir)/Makefile.common

TARGET = libpcmcia.a
YFLAGS := -d

all: $(TARGET) pcmcia_probe.o

clean:
	rm -f *.o $(TARGET) lex_config.c yacc_config.c yacc_config.h

FLAGS = -D__linux__ -Wall -Werror -Wno-deprecated-declarations -Os -fomit-frame-pointer -pipe -c -I.. -D_DEFAULT_SOURCE
# (blino) make sure yynewerror and yyerrlab are uselessly used
FLAGS += -Dlint
LFLAGS += --nounput


OBJS = probe.o startup.o yacc_config.o lex_config.o


%.c %.h : %.y
	$(YACC) $(YFLAGS) $<
	mv y.tab.c $*.c
	mv y.tab.h $*.h

$(TARGET): $(OBJS) yacc_config.h
	ar -cru $@ $^
	ranlib $@

$(OBJS): %.o: %.c
	gcc $(FLAGS) $(INCLUDES) -c $< -o $@

pcmcia_probe.o: probe.c
	gcc -fPIC $(FLAGS) $(INCLUDES) -c $< -o $@