1234567891011121314151617181920212223242526272829303132 |
- TARGET=sndpipe
- OBJ=$(TARGET).o
- SRC=$(TARGET).c
-
- ifeq ($(DEBUG), 0)
- CFLAGS=-Wall -Werror
- LDFLAGS=-s
- else
- CFLAGS=-Wall -Werror -g
- LDFLAGS=-g
- endif
- ifeq ($(SDL), 1)
- CFLAGS += -DSDL1=1
- LDFLAGS += -lSDL
- else
- CFLAGS += -DSDL2=1
- LDFLAGS += -lSDL2
- endif
-
-
- all: $(TARGET)
-
- $(TARGET): $(OBJ)
- gcc $(LDFLAGS) $< -o $@
-
- $(OBJ): $(SRC)
- gcc $(CFLAGS) -c $< -o $@
-
- .PHONY: clean
-
- clean:
- -rm -fv $(TARGET) $(OBJ)
|