1f08c3bdfSopenharmony_ciSHELL = /bin/sh
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_ciEXECS = scsimain
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_ciLARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ciCFLAGS = -g -O2 -Wall -D_REENTRANT $(LARGE_FILE_FLAGS)
8f08c3bdfSopenharmony_ci# CFLAGS = -g -O2 -Wall -D_REENTRANT -DSG_KERNEL_INCLUDES $(LARGE_FILE_FLAGS)
9f08c3bdfSopenharmony_ci# CFLAGS = -g -O2 -Wall -pedantic -D_REENTRANT $(LARGE_FILE_FLAGS)
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ciLDFLAGS =
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_ciall: $(EXECS)
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_cidepend dep:
16f08c3bdfSopenharmony_ci	@set -e; for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \
17f08c3bdfSopenharmony_ci	done > .depend
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ciclean:
20f08c3bdfSopenharmony_ci	/bin/rm -f *.o $(EXECS) core .depend
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_ciscsimain: scsimain.o sg_err.o llseek.o
23f08c3bdfSopenharmony_ci	$(LD) -o $@ $(LDFLAGS) $^ -lpthread
24f08c3bdfSopenharmony_ci
25f08c3bdfSopenharmony_ciinstall: $(EXECS)
26f08c3bdfSopenharmony_ci	install -d $(INSTDIR)
27f08c3bdfSopenharmony_ci	@set -e; for name in $^; \
28f08c3bdfSopenharmony_ci	 do install -s -o root -g root -m 755 $$name $(INSTDIR); \
29f08c3bdfSopenharmony_ci	done
30f08c3bdfSopenharmony_ci	install -d $(MANDIR)/$(MAN_PREF)
31f08c3bdfSopenharmony_ci	@set -e; for mp in $(MAN_PGS); \
32f08c3bdfSopenharmony_ci	 do install -o root -g root -m 644 $$mp $(MANDIR)/$(MAN_PREF); \
33f08c3bdfSopenharmony_ci	 gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \
34f08c3bdfSopenharmony_ci	done
35f08c3bdfSopenharmony_ci
36f08c3bdfSopenharmony_ciuninstall:
37f08c3bdfSopenharmony_ci	dists="$(EXECS)"; \
38f08c3bdfSopenharmony_ci	@set -e; for name in $$dists; do \
39f08c3bdfSopenharmony_ci	 rm -f $(INSTDIR)/$$name; \
40f08c3bdfSopenharmony_ci	done
41f08c3bdfSopenharmony_ci	@set -e; for mp in $(MAN_PGS); do \
42f08c3bdfSopenharmony_ci	 rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \
43f08c3bdfSopenharmony_ci	done
44f08c3bdfSopenharmony_ci
45f08c3bdfSopenharmony_ciifeq (.depend,$(wildcard .depend))
46f08c3bdfSopenharmony_ciinclude .depend
47f08c3bdfSopenharmony_ciendif
48