mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
0c62f08a58
make the dependancy files at the same time it makes the object files. SVN r180 (trunk)
47 lines
817 B
Makefile
47 lines
817 B
Makefile
ifeq (Windows_NT,$(OS))
|
|
EXE = dehsupp.exe
|
|
CCDV = @../../ccdv
|
|
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
|
else
|
|
EXE = dehsupp
|
|
CCDV = @../../ccdv
|
|
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
|
endif
|
|
|
|
CC = gcc
|
|
LDFLAGS = -s
|
|
|
|
RE2C = ../re2c/re2c
|
|
LEMON = ../lemon/lemon
|
|
LEMONFLAGS =
|
|
RE2CFLAGS = -s
|
|
|
|
OBJS = dehsupp.o parse.o scanner.o
|
|
|
|
all: $(EXE)
|
|
|
|
$(EXE): $(OBJS)
|
|
$(CCDV) $(CC) $(LDFLAGS) -o $(EXE) $(OBJS)
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
ifeq (Windows_NT,$(OS))
|
|
-del /q /f $(EXE) 2>nul
|
|
-del /q /f *.o 2>nul
|
|
else
|
|
rm -f $(EXE)
|
|
rm -f *.o
|
|
endif
|
|
|
|
%.o: %.c
|
|
$(CCDV) $(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
parse.h parse.c: parse.y
|
|
$(CCDV) $(LEMON) $(LEMONFLAGS) $<
|
|
|
|
scanner.c: scanner.re
|
|
$(CCDV) $(RE2C) $(RE2CFLAGS) -o $@ $<
|
|
|
|
parse.tab.c: parse.y
|
|
$(CCDV) $(BISON) $(BISONFLAGS) -o $@ $<
|