Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 1 | ASN1_ROOT=../asn1/ |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 2 | ASN1_FILES=HNBAP-CommonDataTypes.asn |
Harald Welte | b3dae30 | 2015-08-30 12:20:09 +0200 | [diff] [blame] | 3 | |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 4 | ASN1TOSTRUCT:=$(ASN1_ROOT)/utils/asn1tostruct.py |
| 5 | #ASN1_SRCS:=$(patsubst |
| 6 | |
Harald Welte | 4d42551 | 2015-08-30 23:04:23 +0200 | [diff] [blame] | 7 | CFLAGS=-g -Wall `pkg-config --cflags libosmocore libosmovty libosmogsm` -Iasn1c/ |
Harald Welte | ee77cff | 2015-08-30 16:57:53 +0200 | [diff] [blame] | 8 | LDFLAGS=`pkg-config --libs libosmocore libosmovty libosmogsm` -lsctp |
Harald Welte | b3dae30 | 2015-08-30 12:20:09 +0200 | [diff] [blame] | 9 | |
| 10 | all: hnbgw |
| 11 | |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 12 | .PHONY: hnbap_encoder.c |
Harald Welte | 9da9697 | 2015-08-31 09:38:13 +0200 | [diff] [blame^] | 13 | hnbap_encoder.c: $(ASN1_ROOT)/hnbap/HNBAP-PDU-Contents.asn |
| 14 | $(ASN1TOSTRUCT) -f $< |
| 15 | |
| 16 | .PHONY: rua_encoder.c |
| 17 | rua_encoder.c: $(ASN1_ROOT)/rua/RUA-PDU-Contents.asn |
| 18 | $(ASN1TOSTRUCT) -f $< |
| 19 | |
| 20 | .PHONY: ranap_encoder.c |
| 21 | ranap_encoder.c: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 22 | $(ASN1TOSTRUCT) -f $< |
| 23 | |
Harald Welte | 0bdea4d | 2015-08-30 23:13:06 +0200 | [diff] [blame] | 24 | asn1c/libosmo-asn1-hnbap.a: |
| 25 | $(MAKE) -C asn1c |
| 26 | |
Harald Welte | 4d42551 | 2015-08-30 23:04:23 +0200 | [diff] [blame] | 27 | hnbgw: asn1helpers.o hnbap_common.o hnbap_encoder.o hnbap_decoder.o hnbgw.o hnbgw_hnbap.o asn1c/libosmo-asn1-hnbap.a |
Harald Welte | b3dae30 | 2015-08-30 12:20:09 +0200 | [diff] [blame] | 28 | $(CC) $(LDFLAGS) -o $@ $^ |
| 29 | |
| 30 | %.o: %.c |
| 31 | $(CC) $(CFLAGS) -o $@ -c $^ |
| 32 | |
| 33 | clean: |
| 34 | @rm -f hmbgw *.o |